I read the book The Practice of Programming and worked all the exercises.
bzr get http://www.bamsoftware.com/bzr/tpop-answersto get a revision control copy, if you have an unseemly interest in all my revisions and changes.
I bought the book shortly after it was published in 1999, on sort of a whim after reading a Slashdot review. I don't think I even read the whole book. I didn't appreciate at the time how much it had shaped my programming style. One thing that sticks in my mind is this technique for getting the number of elements in an array:
#define NELEMS(a) (sizeof(a) / sizeof(a))That alone was worth the price.
Doing all the exercises was challenging! It took me 10 months, with several spacious breaks. I think it was harder than The C Programming Language. The exercises in the first chapter are there to trick you into thinking the rest will be as easy. Here are a few difficult ones:
printf, using as many mechanical aids as possible.
grepto work with UTF-8 strings of Unicode characters.
These solutions are dedicated to waffle, the 120 MHz Fujitsu Lifebook laptop computer on which I did almost all the work.
Back Answers for The C Programming Language