Exercises
For each of the following program fragments, first try to work out what the output will be, and write down your guess. Next run the code and check your answers. All variables are integers.
i = 6; j = i += i; printf("%d %d\n",i,j);
i = 5; j = (i -= 2) +1; printf("%d %d\n",i,j);
i=10; j=5; printf("%d ", i++ - --j); printf("%d %d\n",i,j);
i=3; j=4; k=5; printf("%d ",i++ - j++ + --k); printf("%d %d %d",i,j,k);
i=5; j= ++i * 3 -2; printf("%d %d\n",i,j);
i=7; j=3 + --i * 2; printf("%d %d\n",i,j);