The C Programming Language

Author: Brian W. Kernighan, Dennis M. Ritchie
All Stack Overflow 79
This Year Reddit 70
This Month Reddit 7

The C Programming Language


Review Date:


by kevindong   2018-11-12
AbeBooks is a great place to buy the non-US versions of textbooks (which are almost always identical to the US version, but in grayscale rather than in color).

For instance, on Amazon, the K&R C Programming book goes for $28.52 used, $61.74 new, or $28.70 for a one semester rental [0]. For a book that hasn't changed since 1988, these prices are absurd.

While as on AbeBooks, the international edition goes for $10-11 [1].



by exoticmatter   2018-11-10

Well, assuming str is the name of an array of char allocated somehow, you only need scanf("%s",str) - no ampersand.

As for documentation, .

by CSMastermind   2018-11-10

Senior Level Software Engineer Reading List

Read This First

  1. Mastery: The Keys to Success and Long-Term Fulfillment


  1. Patterns of Enterprise Application Architecture
  2. Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions
  3. Enterprise Patterns and MDA: Building Better Software with Archetype Patterns and UML
  4. Systemantics: How Systems Work and Especially How They Fail
  5. Rework
  6. Writing Secure Code
  7. Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries

Development Theory

  1. Growing Object-Oriented Software, Guided by Tests
  2. Object-Oriented Analysis and Design with Applications
  3. Introduction to Functional Programming
  4. Design Concepts in Programming Languages
  5. Code Reading: The Open Source Perspective
  6. Modern Operating Systems
  7. Extreme Programming Explained: Embrace Change
  8. The Elements of Computing Systems: Building a Modern Computer from First Principles
  9. Code: The Hidden Language of Computer Hardware and Software

Philosophy of Programming

  1. Making Software: What Really Works, and Why We Believe It
  2. Beautiful Code: Leading Programmers Explain How They Think
  3. The Elements of Programming Style
  4. A Discipline of Programming
  5. The Practice of Programming
  6. Computer Systems: A Programmer's Perspective
  7. Object Thinking
  8. How to Solve It by Computer
  9. 97 Things Every Programmer Should Know: Collective Wisdom from the Experts


  1. Hackers and Painters: Big Ideas from the Computer Age
  2. The Intentional Stance
  3. Things That Make Us Smart: Defending Human Attributes In The Age Of The Machine
  4. The Back of the Napkin: Solving Problems and Selling Ideas with Pictures
  5. The Timeless Way of Building
  6. The Soul Of A New Machine
  8. YOUTH
  9. Understanding Comics: The Invisible Art

Software Engineering Skill Sets

  1. Software Tools
  2. UML Distilled: A Brief Guide to the Standard Object Modeling Language
  3. Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development
  4. Practical Parallel Programming
  5. Past, Present, Parallel: A Survey of Available Parallel Computer Systems
  6. Mastering Regular Expressions
  7. Compilers: Principles, Techniques, and Tools
  8. Computer Graphics: Principles and Practice in C
  9. Michael Abrash's Graphics Programming Black Book
  10. The Art of Deception: Controlling the Human Element of Security
  11. SOA in Practice: The Art of Distributed System Design
  12. Data Mining: Practical Machine Learning Tools and Techniques
  13. Data Crunching: Solve Everyday Problems Using Java, Python, and more.


  1. The Psychology Of Everyday Things
  2. About Face 3: The Essentials of Interaction Design
  3. Design for Hackers: Reverse Engineering Beauty
  4. The Non-Designer's Design Book


  1. Micro-ISV: From Vision to Reality
  2. Death March
  3. Showstopper! the Breakneck Race to Create Windows NT and the Next Generation at Microsoft
  4. The PayPal Wars: Battles with eBay, the Media, the Mafia, and the Rest of Planet Earth
  5. The Business of Software: What Every Manager, Programmer, and Entrepreneur Must Know to Thrive and Survive in Good Times and Bad
  6. In the Beginning...was the Command Line

Specialist Skills

  1. The Art of UNIX Programming
  2. Advanced Programming in the UNIX Environment
  3. Programming Windows
  4. Cocoa Programming for Mac OS X
  5. Starting Forth: An Introduction to the Forth Language and Operating System for Beginners and Professionals
  6. lex & yacc
  7. The TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference
  8. C Programming Language
  9. No Bugs!: Delivering Error Free Code in C and C++
  10. Modern C++ Design: Generic Programming and Design Patterns Applied
  11. Agile Principles, Patterns, and Practices in C#
  12. Pragmatic Unit Testing in C# with NUnit

DevOps Reading List

  1. Time Management for System Administrators: Stop Working Late and Start Working Smart
  2. The Practice of Cloud System Administration: DevOps and SRE Practices for Web Services
  3. The Practice of System and Network Administration: DevOps and other Best Practices for Enterprise IT
  4. Effective DevOps: Building a Culture of Collaboration, Affinity, and Tooling at Scale
  5. DevOps: A Software Architect's Perspective
  6. The DevOps Handbook: How to Create World-Class Agility, Reliability, and Security in Technology Organizations
  7. Site Reliability Engineering: How Google Runs Production Systems
  8. Cloud Native Java: Designing Resilient Systems with Spring Boot, Spring Cloud, and Cloud Foundry
  9. Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation
  10. Migrating Large-Scale Services to the Cloud
by Mansaber   2018-11-10

If you're new to C, read K&R .

Once you've done that (or if you already know C) then read THE book on Unix programming

by sheepdog69   2018-11-10

That's a big question.

My first question would be why do you want to do kernel development? I've seen several people fantasize about kernel development. It's hard work and can be frustrating some times. But it can be rewarding too.

Without any other programming experience, I'd strongly suggest you get started by learning Python first. It will be immediately useful to you as a sysadmin, and useful if you move into other programming - including kernel development.

Assuming you really want to get into Linux kernel development, there are a few resources to get you started.

For Linux kernel dev, you must know C. No way to get around that. K&R is the book to start with. /r/C_Programming will probably have opinions on where to go from there.

Robert Love's Linux Kernel Development provides a good overview of most of the big pieces of the kernel from a programmers point of view.

As others have said, is a great resource to guide you to your first few commits.

Another good place to practice is

Good luck.

by Callipygian_Superman   2018-11-10

> I've wanted to learn programming, but I absolutely don't want to spend any more money on education. What have you done to try to learn it (what tools or resources?) and how do you use these self taught skills to get a job in that field?

1) Most importantly: I found a programming Meetup group. I was living in Chicago, and there Python user group had several thousands of members. They met twice a month, and a gathering of less than 50 people was a small event. I've just moved to a smaller town (pop. ~225k), and there's still a Python meetup group. Python is a fantastic language to cut your teeth on, as nearly every decent-sized town has a group that meets regularly for the purpose of talking about and learning about Python. I describe the Python community as a little cultish, because I've never seen a community that acts like they do for any other programming language.

2) On the subject of Python: MIT's OpenCourseWare 6.0001: Introduction to Computer Science in Python. This is the way that I learned the basics of Python, and I consider it to be the academic approach, which is the approach that I'm familiar with. You will tackle difficult problems, and the things you learn in the class by doing the homework assignments will be invaluable as you get better with programming.

3) Automate the Boring Stuff with Python is what I would describe as the "practical application" approach. I have not read this book, but it comes highly recommended by everyone in the Python community. As the title suggests, if you want to automate repetitive tasks at your job, this is the way to do it. But it's also deep and comprehensive enough that you will learn more than just simple examples of making clerical work faster.

4) Completing a project. The meetup group in chicago was large and organized enough to where they had a mentorship program. I spent 4 months and ~500 hours completing a project that I envisioned, made specifications for, implemented, and ultimately presented to a group of around 300 people (one of the larger meetup events). One of the biggest takeaways I learned from the project was how to use Classes; most concepts in programming/CS are easy to wrap your head around. However, using them effectively takes practice, and I was using classes left, right, and center for my project out of necessity. There were also a dozen or so other, smaller things I learned along the way.

5) /r/learnprogramming , /r/learnpython , /r/Python , in that order. I only subscribe to the first one these days. But while these are useful, the most important thing is that they led me to using:

6) Discord. There's a discord for everything these days. I am on the Python discord server, as well as the C/C++ discord server. I have moved on from Python to learn C/C++ because those are the languages that embedded systems/robotics primarily use. Using these discords is arguably more important than joining a meetup group, as the meetup group only meets 1-2 times a month. The discord servers are there all day, every day, and any time I'm stumped on a problem I can ask for help.

7) Books: The ANSI-C Programming language , simply referred to K&R. Programming in C by Kochan. I moved to the Kochan book about half-way through K&R because K&R was too outdated; the syntax they used was bad practice, or straight up did not work in newer compilers.

After I complete Kochan's book, I will move on to Data Structures and Algorithms, which I have several books in mind for.

And a final note: this all took a while to do, and these are only the things I recommend doing, after having bumbled around a bit aimlessly some times. Before I got to the MIT OCW class, I was using Learn Python the Hard Way, which I absolutely do not recommend you ever use, ever.

edit: Final final note: honorable mention goes to /r/programmerhumor , which is exactly what its name suggests, but I will occasionally see a concept in there that I don't understand, but will be interested to do some research on.

by ParaMarcin   2018-11-10

Yeah, he gave us two choices of VMware (Fedora and Slackware) that we could download and included the compiler and all the stuff you need in a GUI format. So it's basically a 'desktop' version of Linux that you run off your computer. You don't need to dual boot your computer or anything like that with Linux. However I've heard doing that with Ubuntu is a solid move, as performance with the Virtual Machines are kinda laggy and frustrating as a result. I haven't done this so I can't really say more.

For the most part if you're comfortable with Java, you won't have that hard of a time picking up on C/C++. The thing that definitely got me confused early on was pointers since you don't have to worry about that in Java for the most part. He also just kinda expects you to pick up on C right away, which is frustrating cause this is most students' first experience to C/C++, whereas he's been primarily a C programmer for the past decade or two. While no books are required, he does frequently mention C Programming Language for those interested in learning C outside of class. Not too expensive if you're intrigued, but definitely not required by any means.

If ya got any other questions regarding the class, let me know.

by TheMitraBoy   2018-11-10

I second this. K&R is one of the most concise books I have ever read. Here is the link

by Jither   2018-11-10

Yeah - I'm probably the odd one out, having almost no programming- or technology-related books left on my shelf - other than a couple of the classics that don't get outdated. I do still have this one and this one , although those are only for nostalgic reasons.

The set dresser comment was before I saw what else was on the shelf - I don't find it all that unlikely a collection now - although I'm still hard pressed to find a reason that Elliot would need e.g. a "missing manual" for OSX Mavericks in 2013. Or a relatively recent (from the typeface and colors, probably at least mid-00's) edition of PCs for Dummies. :-) But like someone said, maybe that was a gift.

by Neui   2018-11-10

I would make the logo a blue C, like in the title page of The C Programming Language :