Answer to Question #152425 in C++ for Usama Saleem

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;
1
Expert's answer
2020-12-23T05:04:27-0500

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!

Comments

No comments. Be the first!

Leave a comment