How do we explain the result of the expression (++x)+(++x)+(++x)?

We explain it by expecting undefined behaviour rather than any particular result. As the expression attempts to modify x multiple times without an intervening sequence point its behaviour is undefined.

Leave a Comment