Exercise 1-7 K&R2