I don't know if this is compiler specific but when I tried running the two expressions in DevC++
When i=c=b=0;
i=i++ + ++c
gives 2
whereas i=++i + c++
gives 1
But
b=i++ + ++c
and
b=++i + ++c
produces the result 1
for both expressions.
I do know that incrementing a variable twice in the same expression results in an undefined value according to the C standard specification but I'm curious how the compiler produces these output. Could someone please explain how and why?