Question #152425

What is the output of the following:

a) int x=10, y=20;cout<<x+++++y;
b) int x=10, y=20;cout<<x++-++y;
c) int x=10, y=20;cout<<++x+y++;
d) for(int x=0;x<10;x++)cout<<x;
e) for(int x=0, y=3; x<2*y; x++,y--)cout<<x;

Expert's answer

Output is

in case a: 31

in case b: -11

in case c: 31

in case d: 0123456789

in case e: 01



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS