9.4 void foo() { int i; printf("%d ", i++); } int main() { int j; for (j = 1; j <= 10; j++) foo(); } This is not really a C "problem" since the C specification states that the value of an unitialized local variable, such as i, is undefined. When foo() is called, i is assigned to whatever value happens to be in i's slot on the stack, which *should* be at the same memory location on each call. The value will be "random" on the first call, but will increase by 1 on successive calls. 9.10 Can you swap values in call-by-name? Algol is language best know for call by name. Look at the following reference for a discussion about this in Algol. http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html Here's the obvious Algol procedure -- which looks unexciting. procedure swap (a, b); integer a, b, temp; begin temp := a; a := b; b:= temp end; However, if you call with swap(I, X[I]), this does: temp := I ; I := X[I] ; X[I]:= temp which ends up setting X[X[I]] to the original I The textbook solutions refers to an article by A. C. Fleck in SIGPLAN Notices 11,11(1976), which you should be able to get throught the UNCA library. http://delivery.acm.org.proxy177.nclive.org/10.1145/990000/987339/p38-fleck.pdf Most Algol implementations had ways of avoiding this issue, such as a SWAP assignment, such as I :=: X[I] 9.15 Whew... This is hard... Remember... go right as far as possible inside the parens, the go left as far as possible inside the parens, Then repeat in next level of parents... double(*foo(double (*)(double, double[]), double)) (double, ...); (------------------------------------------) innermost parent -----------------------------------------) going right foo is a function with two arguments [--------------------------] arg1 is a function (double, double[]) --> double ------) arg2 is a double <- foo returns a pointer ------------------------------------------------------> foo returns a pointer to function with variable length arguments starting with a double <------- the returned function returns a double