C++ Programming - References - Discussion

Discussion Forum : References - General Questions (Q.No. 11)
11.
Which of the following statements is correct?
  1. Once the variable and the reference are linked they are tied together.
  2. Once the reference of a variable is declared another reference of that variable is not allowed.
Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
7 comments Page 1 of 1.

Bhagwan said:   3 years ago
Yes, both are correct.

Abhishek said:   5 years ago
I think both statements are true.

Prathamesh mukkawar said:   5 years ago
Once the reference of a variable is declared another reference of that variable is not allowed is the true statement.

HARITHA said:   8 years ago
Because the dress of that particular reffered variable was holded by the refference variable so at a time it is not possible to hold the same adress by two different variables.

Vimal said:   8 years ago
Why we cannot give another reference to the same variable?

Deepak said:   1 decade ago
The following program works,

int a = 12;
int &b = a;
int &c = b;
cout<<c;

It means that reference to reference can be created right?

Santhoshi said:   1 decade ago
Reference variable is a another name given to 1 memory location. We can't give more than one name to same memory location.

Post your comments here:

Your comments will be displayed after verification.