When comparing The C Programming Language (AKA: K&R) vs C++ Primer, the Slant community recommends C++ Primer for most people. In the question“What are the best resources to learn C/C++?” C++ Primer is ranked 1st while The C Programming Language (AKA: K&R) is ranked 7th. The most important reason people chose C++ Primer is:
This book is excellent for people who have basic knowledge of programming concepts or have read an introductory book on programming or C++.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Well known classic
This book is so well known that it's affectionately called "K & R", after the authors.
It's been cited in many other books and is familiar to most, if not all, CS students.
Pro It's excerpted from the idea of its creators
This book is written by Dennis Ritchie, who was one of the main people behind the development and design of C and UNIX.
Pro Creative, challenging exercises
The challenges at the end of each chapter do a great job of requiring many of the skills learned up to that point. Completing the challenges is a great way of insuring you understand the material.
Pro This book set the template for programming language books
Pro Great for people who know just the very basics of programming
This book is excellent for people who have basic knowledge of programming concepts or have read an introductory book on programming or C++.
Pro Explains C++11 extension well
5th edition adds information on C++11 additions and integrates it throughout the book so it's not just an appendix with new stuff.
Pro Covers the core of the language without omitting anything critical
The book describes core concepts of C++ programming in-depth. It covers various nuances that would otherwise be easy to misinterpret.
Cons
Con Out of Date
Some commands and practices are out of date, so errata and googling is needed while going through the book.
Con Teaches bad style
The K&R style works for old Unix mainframe command-line programs that exit after a simple task and leave the cleanup to the OS; where input is only from trusted experts; and most functions are only called internally to the program. The environment is very different today. This style will get your server owned by hackers, or crash it due to a memory leak, etc. You will have to unlearn what you've learned from this book to use C correctly in the real world today.
Con Not for beginners
Assumes familiarity not only with programming concepts but some C language specifics.
Con Complaints about the Kindle version
To quote a reader: "The book itself is great. However, the formatting for the Kindle is messed up".