Exercise 1-3 K&R