C++ Programming - References - Discussion

Discussion :: References - General Questions (Q.No.7)

7. 

Which of the following statement is correct?

[A]. Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
[B]. A reference is indicated by using && operator.
[C]. Once a reference variable has been defined to refer to a particular variable it cannot refer to any other variable.
[D]. A reference can be declared beforehand and initialized later.

Answer: Option C

Explanation:

No answer description available for this question.

Abhilash said: (Nov 12, 2012)  
A reference is implemented internally as a final pointer so once referenced it cannot refer to any other variable.

Santhu said: (Jul 17, 2013)  
int a=10;

int &b=a;

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

Bksail said: (Sep 11, 2019)  
According to me, it is;

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

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.