This line returns 3
:
x = 1; ++++x
However, the value of x
after the increment is only 2.
Similarly, this line returns 5
, while the value of x
is again only 2.
x = 1; ++++++++x
Why does it return 3
and 5
respectively in the above examples?
(This question is intended as a puzzle, and to encourage people to think through an opaque evaluation chain.)
x
? $\endgroup$