Programming Books C Java PHP Python Learn more Browse Programming Books
C Programming Language (2nd Edition) and over one million other books are available for Amazon Kindle. Learn more

Sorry, this item is not available in
Image not available for
Image not available

To view this video download Flash Player


Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $26.29 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Start reading C Programming Language (2nd Edition) on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

The C Programming Language, 2nd Edition [Paperback]

Brian W. Kernighan , Dennis M. Ritchie
4.7 out of 5 stars  See all reviews (429 customer reviews)

Buy New
$48.99 & FREE Shipping. Details
$16.48 - $16.99
In Stock.
Ships from and sold by Gift-wrap available.
In Stock.
Want it tomorrow, July 11? Choose One-Day Shipping at checkout. Details
Free Two-Day Shipping for College Students with Amazon Student


Amazon Price New from Used from
Kindle Edition $30.99  
Hardcover --  
Paperback $48.99  
Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Book Description

April 1, 1988 0131103628 978-0131103627 2

The authors present the complete guide to ANSI standard C language programming. Written by the developers of C, this new version helps readers keep up with the finalized ANSI standard for C while showing how to take advantage of C's rich set of operators, economy of expression, improved control flow, and data structures. The 2/E has been completely rewritten with additional examples and problem sets to clarify the implementation of difficult language constructs. For years, C programmers have let K&R guide them to building well-structured and efficient programs. Now this same help is available to those working with ANSI compilers. Includes detailed coverage of the C language plus the official C language reference manual for at-a-glance help with syntax notation, declarations, ANSI changes, scope rules, and the list goes on and on.

Frequently Bought Together

The C Programming Language, 2nd Edition + The C Answer Book: Solutions to the Exercises in 'The C Programming Language,' Second Edition
Price for both: $90.88

Buy the selected items together

Editorial Reviews Review

Just about every C programmer I respect learned C from this book. Unlike many of the 1,000 page doorstops stuffed with CD-ROMs that have become popular, this volume is concise and powerful (if somewhat dangerous) -- like C itself. And it was written by Kernighan himself. Need we say more?

From the Publisher

This second editon describes C as defined by the ANSI standard. This book is meant to help the reader learn how to program in C. The book assumes some familiarity with basic programming concepts like variables, assignment statements, loops, and functions. A novice programmer should be able to read along and pick up the language.

Product Details

  • Series: How to Make Fast Money on Amazon (Book 1)
  • Paperback: 274 pages
  • Publisher: Prentice Hall; 2 edition (April 1, 1988)
  • Language: English
  • ISBN-10: 0131103628
  • ISBN-13: 978-0131103627
  • Product Dimensions: 9.2 x 6.9 x 0.6 inches
  • Shipping Weight: 15.5 ounces (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (429 customer reviews)
  • Amazon Best Sellers Rank: #5,750 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Most Helpful Customer Reviews
299 of 303 people found the following review helpful
5.0 out of 5 stars A high-intensity tutorial and a great reference March 13, 2000
This book (widely known as K&R, after the authors' initials) has for over twenty years been the best way to learn C. When I got this book in 1980, I had access to a Unix system and worked through much of the tutorial material in it. On the way I learnt a great deal, not just about C, but about good programming style, code reuse, the value of clear comments--in short, I was introduced to the skill set of an experienced computer professional.
The book was a trendsetter in several ways. For example, the very first exercise given is to print "hello, world"; this is now seen as the first exercise in innumerable other, more recent books, many of which may not realize that they are borrowing from K&R. The rest of chapter 1 (there's a chapter 0, an introduction; another geek-cool change which has been widely copied) is a tutorial that takes you through assignment statements, data types, if/else, for, while, printf, function definitions, arrays, and variable scoping, in less than 30 pages. If you work your way through the embedded exercises you'll have written utilities to strip tabs, reverse input by lines, strip trailing whitespace from input, and several others. This is much more challenging than most tutorials, but the effect on the student is that you feel you are being treated as an equal. The book doesn't talk down to you; it gives you accurate and concise answers. It's written for programmers, in other words.
The next few chapters go back over the elements of C in more detail, and should also be treated as a tutorial. Going through this material religiously will be far more valuable than any college class could possibly be.
There is a reference section at the back, which is good to have. But the real value of this book is in the tutorial approach: it is a rare pleasure in the computing field to find a book that is simultaneously clear, stimulating and informative.
Was this review helpful to you?
143 of 153 people found the following review helpful
5.0 out of 5 stars The best programming book I ever bought. July 12, 2000
By Uri Raz
I've first bought this book when I started my academic studies, after 5 years of work with Fortran 77 & three years of work with Pascal.

This small book (270 pages, including the index) served me well through my degree, and I still keep the dog-eared, yellowing, aged book with me at work.

The book focuses on the language itself - this is no hands-on book (no explanations on how to use this compiler or that debugger, though it is a little biased toward Unix) - in a clear, concise, and thorough way covering all of the language and it's standard libraries.

I especially liked the excercises (the solutions come in a seperate volume) and the C source code examples of how some of the library routines are (or may be) implemented.

With this book I had no problem understanding the more difficult subjects (e.g. many people have problems with pointers, and this book makes the subject easy to understand) and avoiding pitfalls.

I've read it in a week, and keeping it in hand's reach smoothly started programming in C.

The only drawback I see in this book is it's price, it's a small book which sells *very* well, and I'd expect it's price to be lower. This book is *not* for people who study C as their first programming language (those would be better served with a pair of books - a first course in programming and compiler guide).
Comment | 
Was this review helpful to you?
118 of 129 people found the following review helpful
5.0 out of 5 stars The most elegant programming book I have ever read November 8, 1997
This book is not "for Dummies". It assumes that you already have some knowledge of structured programming languages (i.e. Pascal). For example, this book spends four well-written pages explaining everything you need to know about functions. If you don't know what a function is, this will clearly not be enough. However, if you do know about functions, this book will not drone on and on for an entire chapter or two on the subject like some of the foot-crunching tomes the size of an encyclopdia.
The book is expensive ($40) for its size (approx. 250pgs.), but it is worth every penny. To quote the authors: "C is not a big language, and it is not served well by a big book."
As a bonus, almost anything you need to know about C can be found in seconds using the excellent index. It should be noted that this is a language reference and will NOT tell you how to use your editing environment or compiler.
In summary, intermediate or advanced programmers should be able to learn C with reasonable proficiency in a short amount of time.
Comment | 
Was this review helpful to you?
31 of 31 people found the following review helpful
5.0 out of 5 stars Condensed Cream-Of-C Soup February 20, 2002
About 5 years into my programming career, I was mildly interested in learning C, so I picked up this book. At the time, I was deterred - it was very brief, terse, and confusing, so I put it back down again.
But now, years later, with many more languages under my belt, I find myself again drawn to C. So I picked up this book again (2nd edition), and finally, I see the light! It is a wonderful book, I agree with all the glowing comments people have written about it, BUT! It is a book written by a computer programmer, for other computer programmers, not a book written by a teacher for a beginning student.
C is alive and well, and still in use today - it lives "at the core" of most popular languages. You can see its influence on C++, JavaScript, even Visual Basic. If you are ready for it, reading and working through the examples in this book will provide you with a solid base for understanding an amazing variety of 'newer' programming languages.
You have to work through the examples, though. If you 'just read' this book, you'll comprehend and retain close to '\0' (null) of the information presented. It's only by going through the examples, that you really nail the subject matter. Yeah, I know, some of these examples are tough - but they're also real-life, and typical of routines every programmer writes and uses. I myself sweated blood over exercise 3-3, but hours later when I was done, the satisfaction of comparing my answer favorably to others was worth it. :-)
I have the C For Dummies books 1 and 2, and after going through them, I was still a Visual Basic programmer. ;-D If you already are a computer programmer, and want to obtain serious knowledge in C without wasting your valuable time, learn from this book.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars content and example is so good.
Writer known everything in C programming very well , content and example is so good.
Published 6 days ago by Pheerawat
5.0 out of 5 stars Recommended
Just enough book for the topic - no door stopper, but a great enabler instead.

Even tho we got all these wonderful languages, knowing C is still a quasi necessity when... Read more
Published 6 days ago by Bernhard Grabowski
5.0 out of 5 stars Classic
Read it if you have to do anything ever in C, C++. A must have for CS students. Concise and to the point. Every word matters, the authors don't BS around.
Published 20 days ago by Edward Januska
5.0 out of 5 stars A Timeless Classic
The crystallised definition of "the original C language" preserved in a useful form for admirers and practitioners alike. Read more
Published 21 days ago by Ernie_Cordell Clayton Cordell, Jr.
4.0 out of 5 stars Good book
This was a good book, it starts with the easy stuff and does a good over view of pointers and structs in the end. Read more
Published 27 days ago by Justin LeCheminant
5.0 out of 5 stars A Great Book for Intermediate and Above Programmers
This book does not hold your hand which, as a programmer with plenty of experience, I feel that I am learning more without the book holding my hand.
Published 1 month ago by Derek Nance
5.0 out of 5 stars Perfect for intermediate programmers
Currently half way through this book. I've worked for about a year in front end web dev and python dev. Read more
Published 1 month ago by Sam Rapaport
4.0 out of 5 stars What to add that hasn't been said?
Like most technical programming literature, there is always a need to supplement, and as others will undoubtedly mention here and elsewhere, the K&R (as the book is called) is no... Read more
Published 1 month ago by Ryan Spencer
5.0 out of 5 stars Great Book
This is just what I needed. The text was clear and easy to understand. Plus, the typeface was readable, which is very important for a programming book.
Published 1 month ago by Michael D Mowery
4.0 out of 5 stars Includes all the basics in an understandable way.
It is very useful and easy too understand even for begginers. Also a useful tool for any kind of programmers.
Published 2 months ago by Karen Valadez
Search Customer Reviews
Search these reviews only

Citations (learn more)
1 book cites this book:

Books on Related Topics (learn more)

What Other Items Do Customers Buy After Viewing This Item?


Search Customer Discussions
Search all Amazon discussions

Topic From this Discussion
Where's the Kindle edition?
yes even I agree. Currently InformIT is bringing up digital copy of this classic. So if folks out there are eager to buy a digital version head out to informit website and you can pre-order this classisc for some good discount!!!
But having said that, Kindle is kindle and we need to have this... Read More
Oct 19, 2012 by Manoj Ramesh Joshi |  See all 2 posts
Ritchie passed away today Be the first to reply
Start a new discussion
First post:
Prompts for sign-in

Look for Similar Items by Category