Speaking of C/C++... The middle part of a Conditional Expression ( between ? and : ) is parsed as if parenthesized; for example: int rv, zz ; zz = 1, rv = zz ? zz = 1, 2 : zz = 3, 6 ; printf( L"%d and %d", rv, zz ); // Prints: " 2 and 1 ". zz = 0, rv = zz ? zz = 1, 2 : zz = 3, 6 ; printf( L"%d and %d", rv, zz ); // Prints: " 3 and 3 ". http://en.cppreference.com/w/c/language/operator_precedence These expressions are undefined/SemiRandom: i = ++i + i++ ; i = i++ + 1 ; f( ++i, ++i ); f( i = -1, i = -1 ); f( i, i++ ); a[ i ] = i++ ; http://en.cppreference.com/w/c/language/eval_order