First, I know this is bad programming and most people say to not use it, but my teacher uses this stuff on his test a bunch.
Can someone explain step by step why b,c,d,e are what they are? If you can break it down to 1+1=2 (step by step at the lowest level) i would love it because I am lost when it comes to this.
#define max 52
printf("%d %d %d\n",a,a++,++a);
b = ++a + ++a + ++a;
c = ++a + ++a + --a;
d = --a + ++a + ++a;
e = ++a + --a + ++a;
/* This prints
12 11 11
I don't really understand incrementations added together.
And is my understanding of printf("%d %d %d\n",a,a++,++a);
correct. So with this since incrementations are right priority (so like reading right to left), the printf does ++a first and saves it as 11 then does a++ which saves it as 11 then increments by 1 then saves a which is 12 all in temp memory and then displays them?
And why can't you increment max when it is defined as 52?
Thank you for all your help