Saw this on a message board I have started frequenting:
the following code segment gives 233 as against expected 123. Can somebody explain why.
Firstly, ghastly code! I wouldn’t like to hire someone who writes that!
Anyway, the C++ standard states that you cannot modify an object more than once between sequence points – the behaviour is unspecified and compiler dependent.