C++ Programming - References - Discussion
Discussion Forum : References - General Questions (Q.No. 9)
9.
Which of the following statements is correct?
- An array of references is acceptable.
- We can also create a reference to a reference.
Discussion:
13 comments Page 2 of 2.
Ronagrawal@gmail.com said:
1 decade ago
int a = 12;
int &b = a;
int &c = b;
cout<<c;
b is a reference to a and c is a reference to b so is it is reference to a reference?
int &b = a;
int &c = b;
cout<<c;
b is a reference to a and c is a reference to b so is it is reference to a reference?
Dimaag_chala said:
1 decade ago
Pointers are different then references. You can obviously have pointers to pointers but the question asks if We can also create a reference to a reference. THAT IS NOT POSSIBLE.
Also, 1st option is wrong for obvious reasons ;).
Also, 1st option is wrong for obvious reasons ;).
Sonu patel said:
1 decade ago
Can anyone how array of pointers and pointer to pointer is not possible?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers