Modifying the same variable more than once within a single expression is Undefined behaviour.(diffrent compiler do it differently).
Here Value of i can be {5 or 6}
Some other Undefined behaviour:-
1. f()+g();
2.a[i]=i++;
3.y=x++ * ++x
Note f(x),g(x) is not undefined behaviour bcz ,(comma) operator introduces a sequence point that f(x) then g(x)