Solutions to exercises from The C Programming Language, 2nd edition, by Kernighan and Ritchie