main()
{
int a=10;
printf("%d\t%d\t%d\t%d",++a,--a,a--,a++);
getchar();
return 0;
}
While running this program in Visual Studio 2012, I am getting the output: 10 10 11 10.
While running this program in Turbo C, I am getting the output: 10 9 11 10
The second output(Turbo C) seems correct from the point of view that parameters are scanned from right to left, evaluated and put onto stack.
But i am sure that the output from Visual Studio also can't be wrong. So, why this difference in output?