Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Softpanorama Classic Series

K&R Book

See the introduction to the series for more information

 
 The C Programming Language : ANSI C Version
Brian W. Kernighan, Dennis M. Ritchie
  • Paperback: 274 pages ; Dimensions (in inches): 0.78 x 9.22 x 7.02
  • Publisher: Prentice Hall PTR; 2nd edition (March 22, 1988)
  • ISBN: 0131103628
     
  • Other Editions: Hardcover (2nd) | All Editions
     
  • Average Customer Review: 4.74 out of 5 stars Based on 186 reviews. Write a review.
     
  • Amazon.com Sales Rank: 3,334
     

Classic book. For example, the very first exercise given is to print "hello, world" became a standard way of introducing new language in a programming books.  Not for the beginner, you need to know well at least one other language before reading this book. Might serve as a quick reference too. Written when memory was expensive, hence it takes all the short cuts to save storage. Therefore some examples (hort implementation of famous UNIX commands) are no longer represent recommended way of coding them.

 
It shows its age. In 2003 one can see weaknesses and their tool-oriented approach looks somewhat naive in view of existence of scripting languages like Perl, Python, TCL, etc.  Still it is a valuable book that somewhat illuminated (sometimes questionable) tradeoffs in designing C as a hybrid of BCPL and PL/1.  From the point of view of PL/1 heritage especially problematic was C treatment of strings (downgrading them into a library) and you can find some interesting info about this design decision in the book. The exercises are challenging and some of them are pretty creative, reminding The Art of Computer Programming  (there is a "solutions book" by different authors)

Here are one of Amazon.com reviews:
4 out of 5 stars The classic text, but there are better books., August 28, 2003
 
  Reviewer: Eric Kent (see more about me) from LA, CA
Yes, this is the classic text on C, but in 2003, there are better books.

If you want to know what went on in the designers mind in the creation of C, get this book.

If you need a tutorial about C, there are better choices.

4 out of 5 stars not the best, June 26, 2002
 
  Reviewer: A reader from New York, USA
with all due respect to K&R, i have to point out that there are better C programming books for beginners. <C a software engineering approach>(3ed), is a good example: it does a better job cleaning the dusty corners of C.

for this K&R's book, one thing i don't understand is that they seem to be obssessed with using string processing functions as examples. the matter of fact is, the C standard library does a lousy job processing strings: most of the string processing functions are type unsafe and tedious to use.

as for why C is so popular (hence this book), one is because C is relatively easy to learn and use, compared with C++, ML etc. the other reason is that unix and most unix libraries are written in C. but with virtual machine around the corner, it's time to move one level up. even though i use C all the time for writing compilers and kernel drivers, other languages like java/ ML/ python/ lisp are much more fun to use.
 

5 out of 5 stars Great Reference Book, Beginners Look Elsewhere, October 30, 2002
 
  Reviewer: HiRez (see more about me) from California, USA
"The C Programming Language" is NOT a book for beginning programmers, or for those very new to C who wish to learn gradually. It is not much of a tutorial. It's written for either very experienced programmers coming from other languages, or for those who know the basics of C and need a reference book. The descriptions and examples are terse, and the learning curve is steep. Once you are comfortable programming in C, however, this is the one book you want next to you (and it will likely be the ONLY reference book you will ever need for straight ANSI C). Since it was written by the original authors of the C language, it's hard to imagine anyone being more authoritative on the subject, and although there's little hand-holding, it is well-written and pleasant enough to read through cover-to-cover. When you're ready to really get your hands dirty, do not hesitate to order this book.
 
 
4 out of 5 stars A great Bible. Not a great tutorial., June 28, 2003
 
  Reviewer: casenagi (see more about me) from Peoria, AZ. United States
I got this book and tried to use it to learn C. I got very frustrated and eventually went out and bought "C by Example" which is more of a beginners type book. After getting my feet wet with the basic concepts I came back to this book and could actually use it to learn from.

If you have no programming experience than I do not reccommend this as your first book. Get a more introductory book first and then dive into the K&R book.
 

 

 


Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 28, 2008