Exercise 1-6 K&R2