Which of the following statement is correct about the program given below? #include<iostream.h> int main() { int x = 10, y = 20; int *ptr = &x; int &ref = y; *ptr++; ref++; cout<< x << " " << y; return 0; }

Question:Which of the following statement is correct about the program given below? #include<iostream.h> int main() { int x = 10, y = 20; int *ptr = &x; int &ref = y; *ptr++; ref++; cout<< x << " " << y; return 0; }

1.The program will print the output 10 20.

2.The program will print the output 10 21.

3.The program will print the output 11 20.

4.The program will print the output 11 21.


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!