What will be the output of the code: | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What will be the output of the code:

int x=5 cout<<++x+x+x-x;

18th Dec 2017, 8:43 PM
rajmit kevadiya
rajmit kevadiya - avatar
2 Answers
+ 1
If X is 5, Then you increase it with ++x Then it'll be 6. Then 6+6 = 12 12 + 6 = 18 Then you did minus x So 18-6=12
18th Dec 2017, 9:46 PM
Dillion Piazza
Dillion  Piazza - avatar
0
12 I guess
18th Dec 2017, 8:49 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar