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 , CBK - G&D - AXIS-olutions
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

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.