I’m thinking of learning C with The C Programming Language, but I keep hearing that it’s outdated. Is it still useful, and what should I watch out for?
Is K&R still a good way to learn C as a beginner?
Answers
If you mean the second edition, yes, it can still teach you a lot of C’s core ideas. Just know that it describes C89, not C99 or later standards, so some newer language features won’t be covered.
Be cautious with examples that use old-style function declarations, and don’t use gets, which was removed from the standard in C11. Pair the book with a current C reference when you’re unsure whether an example matches the compiler or standard you’re using. The first edition is much older and is a poor choice for learning modern C.
Reply to this answer
For a first programming book, I’d lean toward C Programming: A Modern Approach. It’s written for readers who are new to programming and explains the basics more gradually, while also covering C99.
K&R is concise and influential, but that same concision can make it a tougher first step. It can still be a useful second book, or a good choice if you already know another language.
Reply to this answer
The fundamentals in the second edition are still worthwhile, especially if you want to understand pointers, arrays, and how C programs fit together. Just don’t treat every example as the latest recommended style. If you’re completely new to programming, expect to supplement it with something more explanatory.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions