The order in which members are evaluated on the right side of this expression
i = i + 2 + ++i;
- undefined. that is, they can occur in any order. In this case, the compiler decided to increase I first (++ i, third term) before evaluating I (first term), which leads to 3 + 2 + 3.
source
share