Book Review: The C Programming Language, Second Edition

A review of a legendary book.

The C Programming Language Second Edition, is a legendary book in software development circles. This book teaches you C programming language, and it is written by Dennis Ritchie, who created the C language, and Brian Kernighan, who worked at Unix operating systems at Bell Labs in the late 60s and early 70s.

The first edition of this book came out in 1978, (if my research is correct) and this edition came out in 1988. Before the standardization of C, this book was considered the de facto standard of C language. If you read Coders At Work, you will often hear about this book, how some of the old school programmers were given this book, and how they ended up implementing awesome things after reading it.

Let’s jump into the review, shall we?

My review.

The book opens nicely with the first chapter, with the goals of the book stated in the preface. This isn’t a book for beginners, who have no programming experience, and are looking to learn programming from scratch. No, this book expects some experience in programming.

The first chapter is a whirlwind tour of the C language, introducing the basic features of C from statements to printing things to arrays, and functions. I was struck by one important thing, however. And that is the division of the section. The info in this book is organized very well, and the exercises instead of being given at the very end of the chapter, are given at the end of a section. I really like that, since this means the info will be fresh in my mind when I try those exercises, and if I do have to look up something, I don’t have to go too far backwards in the book.

One would think that given how long ago it was written, the language might be confusing to say the least. But I found that this wasn’t the case. The authors used simple words; the language wasn’t that confusing at all. Naturally, they are unlikely to joke like the authors of the current times, but they did communicate their knowledge really well in this book.

This brings me to my next point: the length of the book. Whereas the book by Stephen Prata is a bulky tome, this one is very light, and not very large. Though in the defense of C Primer Plus, that book received updates, and this one did not. But still, the short nature of this book also wins points, in my opinion.

Now, the organization, the exercises, the size of the book, these might be all good, but there are some points. First, the book is significantly outdated. You already get this idea when it constantly mentions languages like Pascal, which was very popular around this time, but this goes beyond that.

Specifically, I’m talking about the practices this book recommends. Some of them are not good, and are outdated. You will get yelled at if you followed this books instructions by letter. For example, not giving variables default values, using #define, even though C developers themselves seem to not recommend it, as said in the answer to this and this StackOverflow questions, and though I didn’t see it much used, using gets().

Needless to say, I won’t give this book to someone today like the managers did in the past, and tell them to learn C from it, and let them roam freely in a codebase after that. There is another problem: this book has not been updated since 1988. The C standard has gone through three revisions since, two of them adding a significant amount of functionality, and one bug fix release. And this book doesn’t cover them at all.

I think you shouldn’t read this book unless you have a historical curiosity. Because even if you need a reference book for C, you can find other better books which are more up-to-date. Be careful, though, if you dare to mention any other book besides this one as a one definitive C-book, you might end up in a flame war. There is no universal book of C which is considered one definitive C-book besides this one, and I suspect there won’t be any in the future either.

Speaking of historic curiosity, I was very curious about catch wrestling, a submission based grappling style developed in Britain. This led me to write this article about the history of this fighting style.

Have you read this book? What are your thoughts about it? share them in the comments. If you like my reviews, then please consider buying me a coffee to support me, thank you.

Did you find this article valuable?

Support Tanish Shrivastava by becoming a sponsor. Any amount is appreciated!