K&R exercises coded by yours truly