That is what is undefined behavior of C.
i = i++
which modify the same value twice which needn't be allowed.
Similarly here
a[i] = i++
which modify i
and use it along the way.
Its all depends on compiler what value is will be assigned .
I think it should be clear . I dont know much about undefined stuffs.