Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the output of that program?

int n =4, k =2;

 

 

cout << ++n << endl;

 

 

cout << n << endl;

 

 

cout << n++ << endl;

 

 

cout << n << endl;

 

 

cout << -n << endl;

 

 

cout << n << endl;

 

 

cout << --n << endl;

 

 

cout << n << endl;

 

 

cout << n-- << endl;

 

 

cout << n << endl;

 

user-image
Question added by Ahmed Maher allam , Senior IT Consultant & System Admin (Lecturer & Trainier) , KGL
Date Posted: 2015/04/06
Khan said
by Khan said , Science Teacher , Mahtab Khurshid Memorial School

The program output will be

 

5

4

4

4

-4

4

3

4

4

4

 

More Questions Like This