C++ Programming - References - Discussion
Discussion Forum : References - General Questions (Q.No. 7)
7.
Which of the following statement is correct?
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;
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.
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:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers