C is 38 years old. K&R V2 is 22 years old. What's the best modern C book?
stackoverflow.com
stackoverflow.com
http://news.ycombinator.com/item?id=1245464
Past that, the trouble with C books is twofold: (a) do you really need that much book for such a small language? and (b) most of what you'd use C for (systems programming, codec design, bare-metal network programming, etc) is covered in domain-specific books that use... wait for it... C as their example language.
These are questions you need to know the answer to, but are unrelated to whatever the book is about.
The best way to learn C is to learn some other programming language, and then apply the common sense you learned back to C.
And in this instance, considering how many people still use and prefer the style in question, if you're learning C there's a good chance you'll be working with others on existing code using that particular style.
They should know enough of what's gone on in the last 20 years of the C world to know K&R's second edition isn't the end all be all of C development.
If you insist on writing to C90 (and for many applications, there are very good reasons to do so), you need to restrict yourself to the intersection of valid C90 and valid C99. You need to do this for the same reasons you would be writing C90 today (well, other than you never bothered to learn C99 in the last decade)
K&R, 2nd Edition, does not observe this (as that's impossible for it to have done so, as it's so old). People who only read K&R, 2nd Ed, tend to not be cognizant of this most important of practices, which makes integration with their code and modern code a pain.
In addition to failing to do this, it uses variable names from an era where terminals were 16x80.
It uses increment operators in wholly inappropriate, precedence overeliant conditionals which would get you slapped silly the first time you cause a serious bug/heisenbug up in any C shop.
It introduces the bad string functions (K&R is often pointed to people who never learned to not use scanf, etc) without any discussion of why you shouldn't ever think of touching them except in very small edge cases and toy programs, nor does it give examples of how to safely use them if you don't have any substitutes available.
Past the actual deficiencies of the text, you still have other issues. At the end of K&R 2ndEd, You know nothing of dealing with characters and languages other than those that fit in ASCII, nothing of using modern threading/multiprocessing/parallelism, nothing of C99 (including why large variable span is bad), nothing of modern object oriented C (which has been in use since systems like X windows used it in the 80s), nothing of standard layouts of projects (or even C source files), nothing of safe string functions, nothing of the differences in variable sizes for different platforms, and in short, nothing of what's happened in 22 years worth of C betterment since this book came out.
The 2nd edition of the book was published in 1998. You need more than that to get a handle on the core of C today.
The end of 32bit ints and non ASCII languages alone mean the book needs more if you are going to use it. It's not enough on its own. If you find out a guy has learned C from nothing but it, it's a pretty reliable indicator "Nope, nope, no modern C experience" and you better make sure he's re trainable into accommodating how things are done today.
Now that you've elaborated, I'll certainly agree that it's not a tutorial for learning how to program, but I don't think it fails all that hard. And some of your criticism misses the mark too. None of the examples are substantive enough to warrant object orientation, there are no threads in C, etc. And ints that aren't 32 bits? When the book came out, tons of ints weren't 32 bits or even power of 2 sized. I never picked up that assumption from my copy. And I'm not aware of anything that won't actually compile.
The dangers of using bad functions is real, but the alternatives don't exist in the standard. It's unfair to complain that a book that describes the C standard only describes what's in the standard. C99 didn't change all that much about the language.
It describes more than what's in the standard (namely, non-standard functions you could use to implement the standard). Other books describe the problem, and what you should do instead today (the entire point of this discussion is finding better substitutes to this very old book). My frustration comes from people hired to do C who think that book is cannon, when it's really more like "what was current in the early 90s".
I do get why you were originally reacting though. If I thought someone was just objecting to the brace style of the code I'd find that questionable as well.
Another thing which makes me really question the value of a C90 only book is that when confronted with things C90 doesn't do well (say, fixed sized types), you'll reach for C90 based solutions of the 90's to solve that problems (say, company defined type sizes and variable naming standards based on size), rather than the C99 solutions to those same problems, aka, the standards based solution to the problems.
I'd still think about getting K&R for perhaps the 4th book on C for a person (after something like Advanced Programming in the Unix Environment or _insert C language on platform of their choice_). Just not #1 anymore, and probably not #2.
http://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0...
http://www.amazon.com/Study-Guide-Programming-Modern-Approac...
http://www.amazon.com/Programming-3rd-Stephen-G-Kochan/dp/06... <=Dunno if it covers C99 either, but very basic
EDIT: Or maybe not. It's just surprisingly expensive (~$60) and Amazon apparently doesn't stock it themselves.
C A Reference Manual http://www.amazon.com/Reference-Manual-Samuel-P-Harbison/dp/...
Expert C http://www.amazon.com/Expert-Programming-Peter-van-Linden/dp...
C Interfaces and Implementations http://www.amazon.com/Interfaces-Implementations-Techniques-...
C Traps and Pitfalls http://www.amazon.com/C-Traps-Pitfalls-Andrew-Koenig/dp/0201...
C as a language is pretty simple to learn. Using C in practice is where things can be tricky when you need to dance with the compiler and work on low level systems where a datasheet is always open, and if you haven't had your "Pointer Enlightenment" you're toast. Domain-specific books are key there and just continual practice.
I have also heard good things about Illustrating C
Looking forward to seeing the final product.
I care deeply about programming, and about preventing software from turning into a mass cargo-cult profession. I want more systems-knowledgeable people out there who understand how things are and could be built.