The C programming language, 2nd edition, Kernighan and Ritchie. Solutions.