While maybe not showing extensions of various UNIX flavors it also does not clutter with .net and other temporally contrived notions that inhibit portability.
Some people refer to this as the "c" bible. Written by Brian W. Kernighan, and Dennis Ritchie, well known in the C and UNIX field. This book is not cluttered with C++ forcing you to figure out what part is "c".
You may think that this book is not for beginners. However it is actually more of a combination of dictionary and "The Elements of Style" for the "c" language
This does of course include ANSI c, which is transportable to all platforms. It also states that", since the ANSI C library is in many cases modeled on UNIX facilities, this may help your understanding of the library as well."
The language it's self as with any language has its strong points. The main one being pointers. By not duplicating data and not having to movie it all around the application can be lightning fast and the code tight and to the point. Other advantages of the language are pointed out as with bit shifting.
This book should be used as a prerequisite to c communications books.
on September 12, 2001
It is difficult to avoid cliches when talking about this book - it is just so good, that one can't help heaping superlatives on it.
This book is affectionately known as 'K & R', after the names of the authors, and it is almost definitely the most widely respected of all books on any given programming language.
This is the book that introduced the 'Hello World!' program to the world :-), which is now practically a standard first program in any introductory book on any programming language.
This is straight from the creators, and the implied authority, while an excellent reason in itself for taking a look at the book, pales in comparison to its other merits - brevity & clarity being foremost.
This book is best appreciated if you already have some programming background - i say this from experience, since i knew Fortran 77 & Pascal before i learnt C, and the knowledge of Pascal, in particular,made it much easier for me to pick up C than classmates for whom it was the first programming language.
Of course, if you're new to programming, you could still try learning from this, but it might be a bit of a struggle. If so, the books by Kelley & Pohl, K.N.King or Gottfried(Schaum series) may be useful for 'getting upto speed' with C first, and then coming to K & R.
C is the one language which is both 'high level' and 'low level' at the same time - to date, it is the nearest to the ideal of a programming language that is easy enough in description to be followed by human readers, and at the same time close enough to the machine's language to be executed fast.There are faster languages, to be sure - assembly language is necessarily faster than any high level language. But just try coding a reasonably involved program in assembly, or even reading such an effort ! There are other languages which might be 'easier' for people to read, but they are slower(C++,Java,etc,etc).
It is also the 'mother' of all modern biggies - C++ owes even its very name to C, Java was derived from C++, and Perl is **written** in C !!
So knowing C would give you a better appreciation of the other languages as well.
And it's still the language of choice for systems programming - so no systems programmer can afford to be a non-expert at C.
Anyway, back to the book - and what a book it is! The authors are not just great programmers, they are outstanding writers as well.
The book is just 274 pages, but it will teach you more than most thick 'tomes' on programming could ever possibly teach.
And no, that doesn't imply that it's 'dense' or abtruse. The authors choose their words judiciously, and there is not a word out of place.The book is designed to make you think, for there is no better way of learning than to think things out for yourself.
Reading the carefully worded text and working out the compact examples will teach you a lot - if you can go through all the exercises, well then you'll surely be an expert when you finish the book. I never did, but i learnt enough to implement several projects in C over the past six years, right from searching and sorting to cryptography and speech recognition.
The examples in this book are a thing of beauty (and therefore a joy forever!!). Elegance, in one word.
It has that universal characteristic of a great book - no matter how many times you read it, you'll learn something new.
You may buy several other books for specialized purposes of particular projects, but when you want to get into the nitty-gritty, to clarify any elusive points, you'll return here, to 'the word of the law', as laid out by the creators of the language.
Basically, if you program in C, you've just got have this book -
and once you have it, you'll find it indispensable.
on July 31, 2001
I'm new to procedural programming. I bought this book as a reference for the ANSI C language, so that I could look up various rules or constructs that might otherwise be described less thoughtfully in the various how-to books that are available for C Programming. I was not disappointed in the least.
My advice to those learning C as their first programming language is to get either C for Dummies (Vol 1 & 2 are sold together on this site) or Learning to Program in C by Deitel and Deitel. The latter will certainly build your skills more, but the former makes it easier to get started and keep an interest through the first few chapters (usually the most critical ones when working with books like these). Then you can use this book as a cross-reference when something doesn't make sense to you.
Even so, if I could learn from only one book, it would be this one without a doubt. It's relatively short length is one of its great strengths. Nowhere are you buried in obscure references or cryptic examples. It's all very clearly put together for the reader. No wonder it's hard to find used copies in good condition!
on May 30, 2001
I've been programming for a little over a year now, I've had two (very light) semesters of C++, and I use perl quite a bit as well. I came to this book looking to get a solid foundation with C before pursuing my interests in compiler design and computer graphics programming. The examples, I thought, were a bit more plausible than in many other programming books, and infact many are (sometimes scaled down) equivalents of standard library functions. Moreover, the examples are very elegantly written, and get you thinking about clever ways to exploit this languages syntax. Some of the concepts in this book are so dense (sometimes unrealistically, but for good reason), I would stare at the same few lines of code trying to decipher what it meant. But that's what helped my C-contemplating brain-cells grow, and now I can decipher the meaning of many convoluted C statements very quickly.
I also thought 'Programming Perl' was a great programming book also, and I sometimes wonder if the popularity of these languages can be at least partially attributed to having great texts like this to learn them from.
on May 6, 2001
Any serious C programmer should own this book. It may not be you first book in C if you have never programmed before (even then I suggest you try to start with this book, it definitely pays off). This book is comprehensive and straight to the point. And very accurate -- you'd be amazed by how many C books out there that are just plain wrong, either because the authors don't know what they are talking about or they bend the concepts to make them more accessible -- always a bad idea.
First part of the book is a tutorial-style introduction to the C language. Definitely read each chapter more than once if you are just learning to program. The exercises are excellent, and answers are provided in a separate volume. Even if you solve the problem, still take a look at the answers. You pick up clear and efficient style by looking at good code. Remember some of the subtlties talked about in the book you will not get until you are much more experienced with C.
Get this book. It's expensive, but worth it.
on April 25, 2001
Boy, does this book ever take me back. The first edition of this book was the first book about computers I had ever read. I had an Apple IIe, a C development environment (on 6 floppy disks, which had to be swapped in and out while building), and was trying to teach myself to program. I mostly understood what I was reading - until I got to the section about pointers, which I found incomprehensible. I just couldn't figure it out, until I was reading another book about the Apple II, which explained how the video system worked - then I got the idea that if I took a pointer and set it to video buffer, I could change what was displayed on the screen. Voila, it worked, and I was started on a profession that lasted to this day.
I still have that first edition, and years later, in 1988, when the second edition was published, I bought that. Well, there hasn't been a third edition, nor has one been needed. C is essentially a finished product. It does what it was made to do, which was to fill a role that didn't exist at the time of its creation, a language that could be used for both systems and applications programming. At that time assembly language was used for systems programming, and languages like COBOL, FORTRAN, or Pascal were used for applications programming. C could be used for both, and the rift between systems programming languages and applications programming languages was healed, at least until recently (applications programming has largely migrated to C++, while systems programming is still largely done in C).
If you want to do systems programming, you just need to learn C. But what if you want to do applications programming? Is it still worth your while to learn C? Well, yes. Here are some reasons why: First, C++ (and Java too, for that matter) are derived from C and are easier to learn once you know C - in fact, C++ is essentially a superset of C, to learn C++ you need to learn pretty much all of C anyway. Second, there are still a lot of C programs around, it is handy to be able to work on them should the need arise. Third, programming examples pretty much everywhere are routinely written in C. Fourth, C is just a neat language in its own right in which to write code; it is small and easy to learn, lends itself to small, fast code, and is available in almost every development environment.
So, if you are going to learn C, should you get this book?
For the first edition, the answer was easy because the book at that time not only taught people to program the language, it was the authoritative definition of the language - you would have been foolish to attempt to learn the language without it.
For this edition, that is not necessarily true - in fact, the book cover now refers to "ANSI C", as ANSI has taken over defining the language standard, which the first edition of this book had formerly filled. In one sense, "K & R", as it has been known through the years, is now just another book about C. But in another sense, this book still is C - you can put the first edition and this one side by side (I have both before me now - the first edition is battered and worn, but otherwise very like the second), and be amazed at how similar the two are. Not many changes were made to the language definition between the two editions (all of them good ones), so there was little need to rewrite because of content changes. Most of the changes were for clarity - the chapter on pointers, which gave me so much trouble so many years ago, was the only one completely re-done for the second edition and is much the better for it.
So what does this book have that other C programming books do not? Authority. History. Community. The creator of the language wrote this book. For over two decades programmers have learned the language from this book. This is the book that you are more likely to share with other programers than any other. In sum, if you are interested in learning C programming, it should be an easy decision to go ahead and get this book.
on February 26, 2001
I've recently re-read this after several years. If you have a serious programming language under your belt (and Visual Basic doesn't fall under that heading), this slim volume may well be the only book on C that you will ever need. There are numerous examples and exercises throughout the book. There are also suggestions and examples of sensible coding standards.
The book begins with a brief, thirty page tutorial on core C functionality. What's surprising is that by the end of this chapter, one can write moderately interesting C programs. Following chapters cover various areas in more depth. For example, the sixth chapter covers pointers and arrays. This is an area that many new programmers find difficult. The authors provide a lucid, detailed discussion and an algorithm written in C for understanding complex declarations like:
That is, x is an array of pointer to function returning pointer to array of char. Of course, one would rarely see such a declaration in practice, but it is important to be able to understand such declarations.
The standard library is used throughout and is summarized in an appendix. Some of the examples and exercises indicate how some standard library functions might be written in C.
As the authors say, "C has proven to be an extremely effective and expressive language for a wide variety of programming applications." This book is an excellent learning source and reference on C.
on February 9, 2001
If human nature subscribes mistakenly to the Whig theory of history, holding what is newest to be best, then the reality that there exists no comparable book on C++, or on Objective C, or Perl, Java, or Python, may be seen as a corrective clue.
The C language strikes precisely near center of the perfect balance between low and high level. To think of other languages as being more "modern" is misleading, when what they are, really, is simply different for having been specialized, targeted, or made "safer," meaning less capable, or in some other manner moved away from that center. Unlike nearly anything else one may think of in the world of computers, the C language has withstood the test of time, and so too has this book.
When we say "the C language" nowadays we mean of course the ANSI C language covered in this book. If you are really a beginner it would be helpful to locate a copy of the first edition that covers the original C language, now called "traditional" or sometimes "K&R" C; the differences are minor, but you should know what they are.
on January 3, 2001
... But if you want to learn the language, unless you somehow know every other previous language, or know everything there is about UNIX. You will not learn C from this book. At least I did not.
It took me 2 days to realize what a filter is (the 3rd&4th code samples in the book, entitled 'File copying'+'Line Counting' are "filters"). A filter is when you utilize the DOS input redirection command (">") to redirect a program's input to a file, rather than using the keyboard for input.
Once I learned some of the langauge (By reading C for Dummies vol. 1 and 2--Excellent learning books) I came back and actually understood a lot of the terse text in this book. When you have questions about the language, rather than bringing a learner's book around with you everywhere, which are usually in excess of 600 pages. You can bring this very compact book to look up topics you are rusty on, or if you forgot the syntax. Or any sort of etiquette. Also, great for discovering new ANSI standard library functions.
This book is a must own for a C programmer. Not while you're learning, but for every day after you've learned. I can throw my Dummies books in the trash now, or loan them out to friends, but this one stays close by.
on October 12, 2000
Before ANSI C existed, this book was the standard definition of the C language. The authors, Kernighan and Ritchie, are the K and the R in "K & R C". This edition of the book has been updated to reflect changes made to the C language by the ANSI committee. The second half of the book contains a reference section with the complete ANSI definition of the C language and libraries. In addition to being the authority on the subject of the C language, this book is also a great learning guide. The first section contains an introduction to the C language and tutorials. When I was learning C, I was coming from a BASIC background and had a very hard time understanding pointers. Of the many C books I read, this was that first one that really explained everything clearly. Many of the examples and tutorials involve writing your own version of standard library function such as strlen(). This is a great way to learn to use the language and better understand the library at the same time. I highly recommend this book to anyone learning C or trying to get a better understanding of it.