//Austin Guthals // Assignment 15 page 286 of "Programming Languages" Addison-Wesley #include #include #include static int fun(int *k); void main(void) { int i=10, j=10, sum1, sum2; sum1 = (i/2) + fun(&i); sum2 = fun(&j) + (j/2); printf("Sum1 = %d, Sum2 = %d\n", sum1, sum2); } static int fun(int *k) { *k += 4; return 3 * (*k) -1; } /* Sum1 gets the value of 46 Sum2 gets the value of 48 */ /* 21. For the following C code int fun(int *i) { *i += 5; return 4; } void main() { int x = 3; x = x + fun(&x); } a. x would get the value of 7 if operands are evaluated left to right. b. x would get the value of 12 if operands are evaluated right to left. */