K&R Exercise 2-4