Also note that the operator precedence only affects the evaluation of
the expression in C/C++, not the order in which side effects take
place.

On Jun 8, 11:46 am, mtsay <[email protected]> wrote:
> In the case of i = i++ + i-- in Java/C#, the order of execution is:
>
> temp = i + i; ( evaluate the expression )
> i = i + 1; ( apply side effect of the expression at the order in which
> values are evaluated. Note that both C# and Java actually specify the
> order of argument evaluation and the order in which side effect takes
> place )
> i = i - 1; ( apply the 2nd side effect of the expression )
> i = temp; ( assign the value of the expression to the variable )

-- 
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to