New course! Every coder should learn Generative AI!
Try a free lesson0
What will be the output of the code:
int x=5 cout<<++x+x+x-x;
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
0
12 I guess