C++ References: Interview questions
What is the difference
between pass by value and pass by reference?
Latest answer: In pass by value approach, the called function
creates another copies of the variables passes as arguments. In this approach,
the values of the original variables remain unchanged. However, we
.....................
Read
answer
What are References in C++? What is a local
reference?
Latest answer: A restricted type of pointer in C++ is known as
a reference. A reference can be assigned only once and can not have a null
value......................
Read answer
Latest answer: A reference variable is just
like pointer with few differences. It is declared using & operator. A
reference variable must always be initialized. The reference
variable.............
Read answer
Pass by value:
Latest answer: The callee function receives a set of values
that are to be received by the parameters. All these copies of values have
local scope, i.e., they can be accessed only by the callee
function..............
Read answer
Latest answer: A reference must be
initialized at the time of declaration whereas not needed in case of pointer. A
pointer can point to a null object...............
Read answer
|