Interview Question
Country: -
Forgot to mention, printf statements like above are like stack operations so when the compiler sees this expression, it reads each value and pushes into the stack (push operation). When it needs to do the evaluation, it pops out each of the values from the stack,hence the right to left evaluation.
i is increased multiple times before the next sequence point, so it is undefined behavior. On a different platform /compiler the result could be totally different
- Anonymous October 31, 2011