Examples and exercises from Kernighan and Ritchie's "The C Programming Language, 2nd Edition"