Exercise 1-2 K&R2