Please, can anybody explain this #C #programming #riddle? It was originally intended as example for first lesson of C course for beginners, but I fell into trap!

The source:

#include <stdio.h>

void main(void)
{
int a=1, b=1;
printf("Hello++: a==%d, b==%d, a++==%d, ++b==%d, a==%d, b==%d, a--==%d, --b==%d, a==%d, b==%d\n",a,b,a++,++b,a,b,a--,--b,a,b);
}

The output, when compiled by #gcc:

Hello++: a==1, b==1, a++==0, ++b==1, a==1, b==1, a--==1, --b==1, a==1, b==1

(Hint: it works as expected, if you separate the single printf into 5 printf-s with 2 arguments each. The problem is unexpected behavior of C++-ish ++ and -- operators, when used multiple times as multiple function arguments. Remainds me of multiple evaluation of macro arguments, or something like that)

@xChaos order of argument evaluation is unspecified.
@pinskia yes, it is not even reverse order. a seems to be evaluated from right to left, but b the other way around...
@xChaos But with the odering being unspecified, modifying the same variable without a sequence point is undefined. And arguments comma are not sequence points.

@pinskia yes, I learnt already, then if compiled with -Wall, there are even warnings about that.

Still, it is very counter-intuitive behavior.

@xChaos I don't disagree. Maybe it will fixed in C3x :).