Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C++ Programming
»
References
Which of the following statement is correct about the program given below? #include<iostream.h> struct Tab { short n; }; int main() { Tab b; Tab& rb = b; b.n = 5; cout << b.n << " " << rb.n << " "; rb.n = 8; cout << b.n << " " << rb.n; return 0; }
It will result in a compile time error.
The program will print the output 5 5 5 8.
The program will print the output 5 5 8 8.
The program will print the output 5 5 5 5.
Show Answer
Correct Answer:
The program will print the output 5 5 8 8.
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment