You should not change the value of any variable more than once in a single command. The result is undefined. It's the same reason why this: ++a++; is unreliable and the result will change from compiler to compiler.
This is an error, similar to reading an array out of bounds: the compiler doesn't have to report it (although some compilers do), but the output can be anything at all, the program may crash too, or do whatever.
For example, I get the output of "5 6 8" with the IBM and Sun compilers, and "7 6 8" (after two compiler warnings) with GCC, and both are equally correct.
What i have read in a book that order of evaluation of arguments of a function is not guaranteed . So out of three which one will be evaluated first is depend on compiler we are using. So i think the result will be undefined .