
The C Programming Language
by Brian W. Kernighan, Dennis MacAlistair Ritchie · first published 1978
604mentions
246recommended by
501HN commenters
2007–2026first – last mentioned
49% recommend46% neutral5% critical
Why HN recommends it
Concise yet complete treatment of C, blending examples, explanations and reference, with the standard library covered. Suits programmers who want to learn C properly and deeply understand how it works.
Summarised by Claude from recommending comments
Very well known, classic introduction to the C Programming Language. Both a text for learning, a reference, and, to some, the definition of proper C language features and use.
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








…dense and to the point; it makes it quick and easy to look up both the syntax of individual features, and the thinking behind them. Basically, my ideal programming book is Kernighan and Ritchie's "The C Programming Language" -- I want that, but for Python.
on “Ask HN: ______ is to Python as K&R is to C?” ↗…there is no time to stop and write them down. I'm glad BK did. UNIX is foundational to essentially all software-driven technology today, in one way or another. His book (along with Dennis Ritchie) on the C Programming Language made a huge impact for me as a CompSci student in the 80s, as did UNIX itself (Ultrix and DG/OS were my fist UNIX variants). I look forward to read his book.
on “Unix: A History and a Memoir, by Brian Kernighan” ↗…Computer Programs - Abelson and Sussman (aka SICP, aka The Wizard Book) Introduction to Algorithms - Cormen, Leiserson, Rivest, Stein (aka CLRS) Design Patterns - Gamma, Helm, Johnson, Vlissides The C Programming Language - Kernighan, Ritchie The C++ Programming Language - Stroustrup The Scheme Programming Language - Dybvig Practical Common LISP - Seibel Programming Perl - Wall, Christiansen and Orwant ANSI Common…
on “ASK HN: Hacker Bibles” ↗Fortunately, 18 years ago, I began learning C from the book The C Programming Language, 2nd ed. written by Brian Kernighan and Dennis Ritchie. The subject of pointers was generally believed to be scary among fellow students and many of them bought pretty fat books that were dedicated solely…
on “Massacring C Pointers (2018)” ↗Despite what many think, I'd say the "The C Programming Language (2nd Edition - ANSI C)" by Brian Kernighan & Dennis Ritchie (K&R) book is still a good introduction to C. It doesn't go into best practices, or other forms of more advanced C programming, but it teaches C well. I'd pair it with "Understanding and Using C Pointers: Core Techniques for Memory Management" by Richard M Reese to get a goo
on “Ask HN: Best book to learn C in 2022?” ↗I guess I grew up in a different time: * The C Programming Language by Dennis Kernighan and Brian Ritchie * Expert C Programming: Deep C Secrets by Peter Van Linden * TCP/IP Illustrated Volume I: The Protocols by W. Richard Stevens * The UNIX System by S.R.Bourne *…
on “The Programming Books That Meant The Most To Me” ↗I would be far more impressed and gratified if Prentice Hall were cool enough to offer Kernighan & Ritchie's classic "C Programming Language" (2nd Edition) at 1/2 off their $57.99 sticker-shock price. http://www.amazon.com/Programming-Language-2nd-Brian-Kernigh...
on “In honor of Dennis Ritchie, 50% off all C/C++ ebooks” ↗and guess what? You don't need a website either. Step 1: Get a copy of "The C Programming Language" by Dennis Ritchie, Brian Kernighan. Step 2: Learn the fundamentals Step 3: Master other languages Edit...I know there's been a lot of negativity towards my comment and I can understand why. I like…
on “You might not need that $15K coding bootcamp” ↗> C works everywhere, and everyone knows C, or can learn it in a couple of weeks and get coding. You hit the nail in the head. The go-to tutorial and reference book of C is «The C programming language» by Brian Kernighan and Dennis Ritchie, which provides a complete and very thorough description of C and its standard library in less than 260 pages. That's unbeatable. As a comparison, the go-to book…
on “The Curious Case of the Longevity of C” ↗…efficiently than others. Just do it. My technique is to read the entire book, highlight text, take notes, work examples, and write programs. My first short-term suggestion for a newbie is to buy and read "The C Programming Language", 2nd Edition, by Kernighan and Ritchie (K&R2). My second short-term suggestion is to download for free and install a free Linux distribution. I like Linux Mint. My third long-term suggestion is to pursue…
on “Ask HN: How do you read programming books?” ↗Start by learning C. The best way to learn C is by reading The C Programming Language by Kernighan and Ritchie. Then read Effective C++, More Effective C++, and Effective STL by Scott Meyers. Then move on to Exceptional C++, More Exceptional C++, and and Exceptional C++ Style by Herb…
on “Learning C++ in 2010” ↗Another worthy pursuit: buy all of Brian Kernighan's books, not just The C Programming Language. It is well worth the pain of becoming slightly familiar with Fortran and Pascal to read these little gems. Being familiar with how things work is undoubtedly useful, but I argue if you are an application…
on “You Owe it to Yourself to be Old-School” ↗The best C book is the Kernighan + Ritchie book "The C programming language", hands down. This is also one of the best books on practical computer science available today. Other books could help to provide a more modern take on how to adapt the language to 2020, but the original…
on “Modern C” ↗…hyperlinked to the Gawk manual, but it seems likely he actually meant A, W & K's The Awk Programming Language (1988), which you could conceivably read in 2 hours, as it's a joy to read. I used it and The C Programming Language as exemplars of great documentation when writing my own.
on “Awk: `Begin { ` Part 1” ↗Just learn C by reading and working through the K&R book. (It's one of the best CS books ever written.) https://www.amazon.com/Programming-Language-2nd-Brian-Kernig... Also, there's nothing magical about pointers - scripting languages use "handles", which is the same thing except they're read-only to the end-user programmer. The real challenge with C is multi-threaded programming, so don't do t
on “Beej’s Guide to C Programming [pdf]” ↗