Exercise 1-8 K&R2