solutions to exercises in the K&R second edition, plus some other crufty example code