C++ Programming - References - Discussion
Discussion Forum : References - General Questions (Q.No. 11)
                   
                                       
                                11.
Which of the following statements is correct?
 
                                    - Once the variable and the reference are linked they are tied together.
- Once the reference of a variable is declared another reference of that variable is not allowed.
Discussion:
7 comments Page 1 of 1.
                
                        HARITHA said: 
                         
                        9 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.
                
                        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?
                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.
                
                        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.
                
                        Vimal said: 
                         
                        9 years ago
                
                Why we cannot give another reference to the same variable?
                
                        Abhishek said: 
                         
                        5 years ago
                
                I think both statements are true.
                
                        Bhagwan said: 
                         
                        3 years ago
                
                Yes, both are correct.
                Post your comments here:
 
            
        Quick links
                            Quantitative Aptitude
                                    
                                    Verbal (English)
                                    
                                    Reasoning
                                    
                                Programming
                                    
                                    Interview
                                    
                                     Placement Papers