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:
- "The C Programming Language", Second Edition, by Brian Kernighan and Dennis Ritchie.
- "Expert C Programming - Deep C Secrets" by Peter van der Linden.
- "C Traps and Pitfalls" by Andrew Koenig.
Here are the books on C++ that I think should be useful:
- "The C++ Programming Language", Third Edition, by Bjarne Stroustrup.
- "Effective C++", Third Edition", by Scott Meyers.
- "Essential C++" by Stanley Lippman.
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.