I have a small code in C
#include<stdio.h>
int main()
{
int a=10,b;
b=a++ + ++a;
printf("%d,%d,%d,%d",b,a++,a,++a);
return 0;
}
Turbo C gives the following Output (as expected)
22,13,13,13
But GCC (used ubuntu and Code blocks compiler in windows) gives the following
22,13,14,14
I believe that Turbo c output was correct, but how come GCC is returning different output?