Originally Posted by shabbir
Because it calculates right to left.
C standard doesn't say anything regarding order in which arguments are evaluated. It could be right-to-left , left-to-right or maybe something else. Try to write a code which is independent of order in which arguments are evaluated.
The OP's code has undefined behaviour.