I executed following following code.
int main(void)
{
int c;
c=0;
printf("%d..%d..%d \n", c,c,c);
c=0;
printf("%d..%d..%d \n", c,c,c++);
c=0;
printf("%d..%d..%d \n", c,c++,c);
c=0;
printf("%d..%d..%d \n", c++,c,c);
return 0;}
I expected the output as
0..0..0
1..1..0
0..1..0
0..0..0
But the output(compiled with gcc) was
0..0..0
1..1..0
1..0..1
0..1..1
What is wrong with my expectation? In gcc ,evaluation order is from right to left. Is It?