Answers to the exercises in The C Programming Language, second edition

The C Programming Language, second edition by Kernighan and Ritchie is a well-known and rightly praised book. You can read it online. I read the book and worked all the exercises.

My answers in a gzipped tar archive. (Or in a ZIP archive if you prefer.)

Other people working through the book may be interested in the Notes to Accompany The C Programming Language by Steve Summit, maintainer of the comp.lang.c FAQ. Also be aware of the errata.

There is a book, The C Answer Book by Tondo and Gimpel, that has answers to these exercises. I didn't know about it until I was literally on the last (non-appendix) page of K&R; there is an advertisement for it on the back cover. I haven't read it.

I found another site (based on an older one) that has answers to most of the exercises. I didn't find out about it until after I had finished the book, when I was searching for information on Tondo and Gimpel.


Back Answers for The Practice of Programming