Pre & post increment operator behavior in C, C++, Java, & C# [duplicate]

Java and C# evaluate expressions from left to right, and the side-effects are visible immediately.

In C++, the order of evaluation of subexpressions is unspecified, and modifying the same object twice without an intervening sequence point is undefined behavior.

Leave a Comment