K & R Exercise 2.2