+ 1
What should be the output and why?
int y=4; int x = ++y + ++y; cout<<x;
2 Answers
+ 8
Mukul increment and decrement problems are depends on how compiler read the statement with pre and post increment and decrement.
In the mentioned snippet answer would be 12 as last updated value of y would be 6
+ 1
GAWEN THANKS FOR EXPLAINING