Behaviour of arr[i] = i++ and i = i + 1 statements in C and C++

Viewed 2115

In the C and C++ languages, the arr[i] = i++; statement invokes undefined behavior. Why does the statement i = i + 1; not invoke undefined behavior?

5 Answers
Related