C++ Programming - References - Discussion

Discussion Forum : References - General Questions (Q.No. 7)
7.
Which of the following statement is correct?
Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
A reference is indicated by using && operator.
Once a reference variable has been defined to refer to a particular variable it cannot refer to any other variable.
A reference can be declared beforehand and initialized later.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
3 comments Page 1 of 1.

Bksail said:   6 years ago
According to me, it is;

int a=10,c=11;
int &b=a;
b=c;

Santhu said:   1 decade ago
int a=10;

int &b=a;

int &b=c is not possible. Internally reference is treated as a constant pointer.

Abhilash said:   1 decade ago
A reference is implemented internally as a final pointer so once referenced it cannot refer to any other variable.

Post your comments here:

Your comments will be displayed after verification.