The rules are that the condition is evaluated before choosing which alternative to evaluate. Since the evaluation part is ++ , the increment will occur before the assignment (if assignment occurs at all).
Like @caf's comment, there is a sequence point after the control expression. Thus, although (as David Thornley points out) the order of expression evaluations can be rearranged by the compiler (in particular, estimates of side effects), rearrangement cannot intersect points in a sequence.
source share