"The C Programming Language" by K & R - Worth Reading?

Started by
13 comments, last by pizza box 21 years, 6 months ago
I''ve purchased several books over the past few years on C, C++, Windows, etc., and one of them happened to be The C Programming Language by Kernighan and Ritchie. I''ve heard good things about this book, since the author is also the creator of the language, but since it is quite dated compared to some of my other books, I was wondering whether or not it is still worth reading? I''ve read C++: The Complete Reference by Herb Schildt and I have a good understanding of the language. Just curious as to whether K & R''s book has any additional tips or tricks about the language. P.S. Although this may seem trivial to some, I do not have much free time so I try to read anything that would help me expand my programmig knowledge. Also, I am a very slow reader so the 200 or so pages would take me quite some time to read and understand as well. Thanks for you time. Adam Sheehan
Advertisement
Schildt''s books are universally seen as abominations, forget all you learned from them.

The K&R is the ONE true reference about C. Studying it attentively might undo the brain damage you got from listening to Schildt.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
No. It doesn't cover any new C99 features. Because it's so goddamn old! The 2nd Edition is dated 1988...

On top of that, it's dry and completely out of order. Like, in the first chapter they gave an example program that had loops and such, then, going through program one section at a time explained comments, declarations, variables, arithmetic expressions, loops ... Something you wouldn't quite expect in a first chapter.

Plus the authors thought they were teh 1337est hAx0rs in saying shit like "C is a general-purpose programming language which features economy ofexpression, modern control flow and data structures,... " or they use the word "compute alot...

On top of all that, almost half of the book talks about outdated UNIX crap. Not very useful if you're programming Windows.

And I wouldn't say there are any "additional tips or tricks" there.

I bought this book and I knew right off the bat that the authors were programmers and not authors !

My opinion: Just read more recent books like C Primer Plus (which is over -detailed) or other ones such as(like you said)C++: The Complete Reference .

[edited by - Fucho on October 19, 2002 10:14:41 PM]
Fucho, please don't post if you have no idea what the hell you're talking about. You'll only make an ass of yourself.

EDIT: Since you are learning C++ as well, "The C++ Programming Language" (3rd edition) could be very helpful. It's an amazing book, also by the creator of the language, and it is pretty new. I haven't actually read "The C Programming Language", but I'm guessing that TC++PL includes most of the things in TCPL.

[edited by - micepick on October 19, 2002 10:19:03 PM]
I''m not being an ass, it''s true. The book just doesn''t have much.
The K&R book is an excellent reference. But keep in mind that it is about C, not C++. So it won't give additional tricks about C++ features. But if you're looking for a deeper understanding of the C language, then this book is highly recommended.

And please let me reiterate Fruny here, because this is important: Do not buy Herbert Schildt books - Never. Have a look at reviews of his books at ACCU.org, they are all devastating, without exception.

If you're looking for a reference about C++, get this one by Stroustrup.


[edited by - Yann L on October 19, 2002 10:25:06 PM]
fucho, do you have any idea who Kernighan is?

I suppose you''ll be telling everyone that Foley and Van Dam were just a couple of hAx0rs as well?

I suggest you do a little reading up on the history of C.
Thanks for the replies. Glad someone pointed out Schildt''s errors because the book seemed like a good source for C++ material. I''ll be more cautious when reading it now. Also, thanks for any recommendations you made for other C++ related material, right now I am looking for a good, reliable source to the language and it seems a lot of books aren''t doing the job. If you have any more suggestions or criticisms, please post. Thanks for your time.

Adam Sheehan
quote:Original post by Darrell L
fucho, do you have any idea who Kernighan is?

I suppose you''ll be telling everyone that Foley and Van Dam were just a couple of hAx0rs as well?

I suggest you do a little reading up on the history of C.


Look, I just thought they wrote it in a nerdy way. AND the book doesn''t cover any new C99 features, wich was my main point.

Most compilers don''t support C99 features. Most C programmers don''t use them. Lack of information about C99 is not really a problem for a general-purpose C primer.

Phrases like "economy of expression" are in there because they are standard phrases. If the authors expect an audience that wouldn''t know them offhand, yet don''t define them, then that''s a problem. But don''t complain about a programming book just because it has big words in it that you have to look up.

Don''t listen to me. I''ve had too much coffee.

This topic is closed to new replies.

Advertisement