I'm planning to buy a book to learn C Language. Many say K&R is a must-have book for C programmers so I chose it. I see that there are two editions. What are the differences between them?
closed as off-topic by gnat, Dan Pichelman, user40980, durron597, user22815 Jun 4 '15 at 3:39
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Dan Pichelman, durron597, Community
There may be a few cases where a first edition is preferred for some reason or other, but this is definitely not one of them.
If you want to learn C, the second edition is clearly preferred in this case. The first edition teaches a version of C that's been obsolete for decades. C has maintained enough backward compatibility that most of the code in the first edition will probably still work with a current compiler, but it's definitely not written the way you want to write C code any more.
The second edition is written to ANSI C, which the first predated. That alone should make the second book the one to buy.
Definitely the 2nd version. The first version doesn't cover ANSI C.
If memory serves me right, K&R 2nd Edition was published in 1988, to comply with the imminent release of ANSI-C (aka C89)
A lot has happened in the C world since then...
- 1990 - adoption of C by ISO as ISO/IEC 9899:1990 (aka C90)
- 1999 - new revised standard as ISO/IEC 9899:1999 (aka C99)
- 2011 - further major revision as ISO/IEC 9899:2011 (aka C11)
Not to mention the work of MISRA and CERT-C (etc) to produce safer subsets.
I have a copy of both editions, but seldom refer to either...