C++ Programming - References - Discussion
Discussion Forum : References - General Questions (Q.No. 13)
13.
Reference is like a _____.
Discussion:
4 comments Page 1 of 1.
Sankalp said:
1 decade ago
Can anyone comment on this? I m not happy saying that a reference is like pointer.
Kushal said:
9 years ago
@Sankalp.
What you expect here pointer itself stores a ref of the variable rather it is known as the one who stores or points the refrence of the variable so option A is a correct.
What you expect here pointer itself stores a ref of the variable rather it is known as the one who stores or points the refrence of the variable so option A is a correct.
Rob Farmelo said:
9 years ago
A reference does not occupy any storage so in that sense is not a (const) pointer. As I understand its simply another name for the referenced variable and is apparently only used by the compiler.
Pranjali said:
5 years ago
Reference can not be like a pointer. It's just another name of a variable.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers