C++ Programming - References - Discussion
Discussion Forum : References - General Questions (Q.No. 12)
12.
Which of the following statements is correct?
- We can return a global variable by reference.
- We cannot return a local variable by reference.
Discussion:
23 comments Page 3 of 3.
Sergey D said:
8 years ago
Correct answer is C: Both 1 and 2 are correct.
Test must be corrected.
Test must be corrected.
Rupesh said:
6 years ago
We can return only static variable by reference.
Rahul said:
1 decade ago
@nidhi : Agreed !!! both options are correct..
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers