I wanted to know whether using the increment(++
) or the decrement(--
) operator on different variables in the same expression undefined behavior; Such as
int i=1,j=2;
int k=i++ + j++;
In the above code,the value of k
is 3 in clang,GCC and in vc.