Ex21 from Zed's Learn C the hard way