[2006-07-08] Books on C and C++

Tarandeep asked me what books on C and C++ I would recommend for someone who knows a bit of each of these programming languages. My problem is that I do not generally like reading books specific to a given programming language. In addition, I do not know C++ properly enough to be able to discern a genuinely good book on C++ from a mere pretender. He still insists that I write down a list of such books. I am therefore putting this list as a blog post in the hopes that people more knowledgeable about such things would help him out. We did search for such lists on the web but I was frankly not satisfied with the lists that we could readily find.

Here are the books on C that I would readily recommend:

  1. "The C Programming Language", Second Edition, by Brian Kernighan and Dennis Ritchie.
  2. "Expert C Programming - Deep C Secrets" by Peter van der Linden.
  3. "C Traps and Pitfalls" by Andrew Koenig.
(See also: List of books recommended in the comp.lang.c FAQ.)

Here are the books on C++ that I think should be useful:

  1. "The C++ Programming Language", Third Edition, by Bjarne Stroustrup.
  2. "Effective C++", Third Edition", by Scott Meyers.
  3. "Essential C++" by Stanley Lippman.
I did not particularly like Stroustrup's book, but it served as a useful reference when programming in C++.

By the way, many people do not like "The C Programming Language" but I am one of those who just love this book. It is a short book that is always to the point and has examples that teach you a lot about computer programming techniques and style. I agree that you should already know a bit about computer programming to fully appreciate this book. It was the book that I used to learn C. I love all of Brian Kernighan's books in general. He is one of the very few authors who have actually imbibed the lessons from "The Elements of Style".

In India, we have a few books on C and C++ written by some Indian authors that are terrible in my opinion but that unfortunately have been mandated as text books in several colleges here. The result is that many of the graduates who have not been exposed to other books form extremely warped ideas about these programming languages and about things like pointers. Sad.

(Originally posted on Blogspot.)

Other Posts from 2006