Originally Posted by
grumpy
The behaviour, as laserlight said, is undefined.
The word "undefined" in the C standard essentially means that "how it works" can be anything, from reformatting your hard drive, displaying a cartoon of little green mice chasing spacemen on your screen, or printing the value 42 over and over.
Any code that modifies a variable twice between sequence points - which is what your code does - has undefined behaviour.
And main() returns int, not void.
If you want to demonstrate C aptitude, learn the meaning of "undefined" as it is defined in the C standard, and learn that main() returns int.