The behaviour is undefined because you use side effect operators twice on the same variable in the same statement. Twice.

This means the behaviour is dependent on what the compiler writer felt like at the time and should be avoided. Increment a only once per statement and do instead something like:
int b1=a++;
int b2=++a;
int b3=a++;
int b4=++a;
for defined behaviour on all platforms and compilers.