int a=2;
int b=++a -a;
printf("%d\n",b);
printf("%d %d %d",b,b++,++b);
return 0;
In the above code, I expected the output as : 0 0 0 2 But the output given by the compiler was 2 1 2 I do not understand how it's possible. Please explain.
int a=2;
int b=++a -a;
printf("%d\n",b);
printf("%d %d %d",b,b++,++b);
return 0;
In the above code, I expected the output as : 0 0 0 2 But the output given by the compiler was 2 1 2 I do not understand how it's possible. Please explain.