/* postVsPre-fix.c * CS201 - by RA */ #include int main(void) { int i, j; for (i=1, j=1; j<10; j=2*i++) if (j!=1) //this is to skip the first run printf ("\nafter j=2*i++, we have i: %d and j: %d",i,j); printf("\n"); for (i=1, j=1; j<10; j=2*++i) if (j!=1) //this is to skip the first run printf ("\nafter j=2*++i, we have i: %d and j: %d",i,j); printf("\n"); printf("\nthe current value of i is: %d",i); printf("\nresults of printf(i++) is: %d",i++); printf("\nthe current value of i is: %d",i); printf("\nresults of print(++i) is: %d",++i); printf("\nthe current value of i is: %d",i); printf("\n"); exit(0); }