Added K&R exercise 2.3