Have you read the sidebar of this sub? Lots of great resources. Answer from j0holo on reddit.com
🌐
Reddit
reddit.com › r/c_programming › best way to learn c?
r/C_Programming on Reddit: Best way to learn C?
July 7, 2019 -

Hello, I am very new to the world of Systems Programming and Manual Memory Management. I had just completed my schools AP Computer Science course (where we learned the basics of Java) and C has excited me for a while. However I have not the slightest clue as to how to “correctly” learn C. There’s plenty of guides online but I want to know from a veteran C programmer how I should learn C. Like what resources should I utilize, what should I do when learning, etc. I hope to at least get a strong understanding before the summer ends. I know you can’t learn C overnight, or anything for that matter. I wish to apply this knowledge towards System Programming and maybe even OS development. Your responses would be greatly appreciated!

Top answer
1 of 10
20
This year, I've read a few books on C, mostly dealing with "modern C". I started with the older books, but realized that even though they are helpful, C doesn't look like that any more. All of these books disagree with, or contradict each other about what is "right", or what is "accepted". The old books (20+ years) are stuck using K&R C, or C89, and even when they update them it doesn't get much better. One of these "newer" books said something that stuck with me though. Just get in there and start hacking. Make a library with good documentation, that's easy to use, and put it up on GitHub or somewhere. Use the modern standards. There have been some really nice improvements. Just start making something, and if it's useful then share it, because the more libraries we have to choose from, the easier things will be. C has so many tools. Some are really old, but super useful. gdb (or a GUI like Kdbg) for debugging, make for easy compiling, automake, autoconf, libtool, pkg-config for easy compiling on different machines (sharing), doxygen for awesome documentation built from the comments in your source code. They are all made to make things easier on you. Use them, and learn how to step through your code in a debugger when things go wrong. Insert edit: And testing, I'm new to testing in C but there are several testing frameworks that help you catch regressions in your code. I recently stumbled upon snow.h . It's a header-only, macro-based, test framework that is really easy to use and has very little boilerplate. I was using CMocka, but I think I like snow better. I'm writing less code to test, and the output is prettier. I had written a test runner in python for CMocka to colorize the output, but I don't need it for snow. The books that helped me get pretty technical at times, but it's necessary to get things burnt into your brain. I think all of these are available in PDF format: 21st Century C This is one of my favorites, it's from 2013. It introduces you to all of the tools I mentioned above, and has a "just start making stuff" message. Expert C Programming (Deep C Secrets) Very nice, shows you how we got here from the 60s-70s. It has real world examples and some light relief. Modern C Another good one, from 2015. It uses the C11 standard and introduces you to things like _Generic. Object Oriented C This is sort of an advanced book. It has a lot of good info in it, but it also showed me what C is "not". I read it because I wanted to understand the Cpython source code, and know how they are building "objects" in C. I haven't finished it yet, I had to take a detour and read the other books first. This is from one beginner to another. I'm still learning myself, making little header libraries and rewriting my scripts in C for practice.
2 of 10
18
Have you read the sidebar of this sub? Lots of great resources.
🌐
Learn C
learn-c.org
Learn C - Free Interactive C Tutorial
learn-c.org is a free interactive C tutorial for people who want to learn C, fast.
Discussions

Ask HN: How do I learn C properly?
I can write C, but I'm not confident I'm doing it the right way. There are now decades of forums and blogs I can search through, but I'd love to have a single, clean, clear source of truth for recommendations on how to write C code · I've started reading "Modern C" by Jens Gustedt. More on news.ycombinator.com
🌐 news.ycombinator.com
199
432
March 13, 2020
The Definitive C Book Guide and List - Stack Overflow
C is a complex programming language that is difficult to pick up on-the-go by reading online tutorials. A comprehensive book is often the best way to learn the language, and finding a good book is the first step. More on stackoverflow.com
🌐 stackoverflow.com
What is the best way to learn C today?
I've posted this here before and it's what has worked for me an a few others who told me it worked for them as well. Ymmv. People sometimes struggle with C when they start from scratch or come from a higher to lower level of abstraction. I struggled with this for a long time till I did these things: I would not try and understand how the higher level abstractions translate to the lower C level. I would instead learn from first principles on how a computer works and build the abstractions up from there. You will learn how a CPU works. How the data bus and registers are used. How memory is laid out and accessed. The call stack and how that works, etc.. This will go a long way in understanding how C sits on top of this and how it's data structures like arrays and structs map to this and understanding how pointers work the way they do and why. Check out these resources: Read Code: The Hidden Language of Computer Hardware and Software Watch Exploring How Computers Work Watch all 41 videos of A Crash Course in Computer Science Take the Build a Modern Computer from First Principles: From Nand to Tetris (Project-Centered Course) Take the CS50: Introduction to Computer Science course. Grab a copy of C programming: A Modern Approach and use it as your main course on C. Follow this Tutorial On Pointers And Arrays In C The first four really help by approaching C from a lower level of abstraction (actually the absolute lowest level and gradually adding layers of abstraction until you are at the C level which, by then is incredibly high!) You can do all four or pick one or two and dive deep. The 5th is a great introduction to computer science with a decent amount of C programming. The sixth is just the best tutorial on C. By far. The seventh is a deep dive into pointers and one of best tutorial on pointers and arrays out there (caveat, it's a little loose with the l-value/r-value definition for simplicity sake I believe.) https://github.com/practical-tutorials/project-based-learning#cc Play the long game when learning to code. You can also check out Teach Yourself Computer Science Here is a decent list of 8 Books on Algorithms and Data Structures For All Levels More on reddit.com
🌐 r/C_Programming
59
165
December 22, 2023
What's the best way to learn low-level programming?

Maybe this would be of interest:

https://missing.csail.mit.edu/

FYI, be sure to check out the 2019 lecture topics as well - they cover a few areas the 2020 ones do not.

Might be too basic for what you are looking for, but maybe not.

More on reddit.com
🌐 r/learnprogramming
11
1
October 27, 2019
People also ask

Is C the hardest programming language?
C is not necessarily the hardest; it depends on the learner's background. Some find low-level aspects of C challenging, while others may struggle more with languages that have complex syntax or abstract concepts.
🌐
mygreatlearning.com
mygreatlearning.com › academy › learn-for-free › courses › c-for-beginners1
Free Online C Programming Course ​with Certificate [2025]
Should I learn C or C++?
It depends on your goals. C is simpler and foundational, good for learning core programming concepts. C++ is more complex with features like object-oriented programming. If interested in system-level programming, start with C; for application development, C++ might be more relevant.
🌐
mygreatlearning.com
mygreatlearning.com › academy › learn-for-free › courses › c-for-beginners1
Free Online C Programming Course ​with Certificate [2025]
Can I learn C in a week?
You can grasp the basics in a week with intensive study, but mastering C requires more time to understand and apply its concepts effectively.
🌐
mygreatlearning.com
mygreatlearning.com › academy › learn-for-free › courses › c-for-beginners1
Free Online C Programming Course ​with Certificate [2025]
🌐
QuickStart
quickstart.com › blog › programming-language › learn-c-programming-in-10-days
Learn C Programming in 10 Days | C Language Basics | C Tutorial
April 10, 2025 - This hands-on practice will allow you to grasp both the mechanics of the programming language and the logic behind the examples, giving you a much clearer understanding of how to apply the concepts to new problems. The best way to reinforce your learning is to start writing your own code as soon as possible.
🌐
Great Learning
mygreatlearning.com › academy › learn-for-free › courses › c-for-beginners1
Free Online C Programming Course ​with Certificate [2025]
Enroll in our free online C programming language course & Understand the fundamentals of C programming from scratch. learn C language syntax, data types & more.
Rating: 4.5 ​ - ​ 16.7K votes
🌐
Quora
quora.com › How-can-I-learn-C-programming-without-any-experience
How to learn C programming without any experience - Quora
Answer (1 of 4): If you don’t have any experience in programming at all, then perhaps it is safe to assume that you are not or at least have not studied as a software engineer. In that case maybe you should ask yourself: Why Learn something as hard as C Programming language? If you like creatin...
🌐
Programiz
programiz.com › c-programming
Learn C Programming
If you're more of a visual learner, ... to C programming. Additionally, you can also follow the C course from Freecodecamp. Best: if you are a casual and hobby learner who wants to just get to know C · While it's possible to learn C from mobile apps, it's not the ideal way because writing ...
Find elsewhere
🌐
Cimat
cimat.mx › ciencia_para_jovenes › bachillerato › libros › [Kernighan-Ritchie]The_C_Programming_Language.pdf pdf
The C programming Language The C programming Language
programming needs. Beginners should supplement it by writing small, similar programs of their own. Both groups · can use it as a framework on which to hang the more detailed descriptions that begin in Chapter 2. ... The only way to learn a new programming language is by writing programs in it.
🌐
Codecademy
codecademy.com › learn › paths › c
Learn C | Codecademy
Learn about the C programming language in this beginner-friendly skill path. Includes **C**, **C Basics**, **C Control Flow**, and more.
🌐
Quora
quora.com › What-is-the-best-way-to-learn-C-programming-from-a-beginner-level-to-the-advanced-level
What is the best way to learn C programming from a beginner level to the advanced level? - Quora
Answer (1 of 3): 1. Find a project you *really* want to do - preferably one which involves modifying some existing high-quality open-source C code, so that you’ll be forced to *read* and understand code written by (relative) experts. 2. Buy a good book on C ...
🌐
Learn C++
learncpp.com
Learn C++ – Skill up with our free tutorials
LearnCpp.com is a free website devoted to teaching you how to program in modern C++. The lessons on this site will walk you through all the steps needed to write, compile, and debug your C++ programs. No prior programming experience is necessary, but programmers of all levels will benefit from ...
🌐
Tmewett
tmewett.com › c-tips
Everything I wish I knew when learning C - Tom Mewett
November 18, 2022 - Sometimes it’s helpful to just read some small, self-contained C code to get to grips with how it looks. Bloopsaphone, a Ruby library for synthesising sounds which has a small C module at its core. Has a small number of concepts and a good structure. esshader, a GLSL shader viewer like ShaderToy.com. A small program which just glues a few libraries together.
🌐
w3resource
w3resource.com › c-programming-exercises
C programming Exercises, Practice, Solution - w3resource
C, developed by Dennis Ritchie ... has compilers for most architectures and OSs. The best way to learn C Programming is through practice....
🌐
Hacker News
news.ycombinator.com › item
Ask HN: How do I learn C properly? | Hacker News
March 13, 2020 - I can write C, but I'm not confident I'm doing it the right way. There are now decades of forums and blogs I can search through, but I'd love to have a single, clean, clear source of truth for recommendations on how to write C code · I've started reading "Modern C" by Jens Gustedt.
🌐
W3Schools
w3schools.com › c
C Tutorial
Learn by examples! This tutorial supplements all explanations with clarifying examples. ... Note: This is an optional feature. You can study at W3Schools without creating an account. You will also find complete keyword and function references: Reference Overview C Keywords C stdio Functions C stdlib Functions C string Functions C math Functions C ctype Functions C time Functions ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: [email protected]
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › csharp
C# Guide - .NET managed language | Microsoft Learn
The C# guide contains articles, tutorials, and code samples to help you get started with C# and the .NET platform. Experienced developers can learn about new features in the What's new section.
🌐
Toptal
toptal.com › c › the-ultimate-list-of-resources-to-learn-c-and-c-plus-plus
The Best Way to Learn C++ and C Programming
July 25, 2022 - With the popularity of C++, several ... One of the best ways to learn a programming language is by writing small programs relevant to the item you study....
🌐
Masters in Data Science
mastersindatascience.org › home › learning › programming languages › learn c
How to Learn C - Programming Languages
December 16, 2024 - If the code doesn’t work the way you want it to, you’ll have to find the problem. Use a debugger. A debugger is a program that identifies problems in your code. Programmers use debuggers to write better code. Look at sample code. Practice reading C programming to learn the fundamentals and use tutorials to practice it. Learning the C programming language might seem overwhelming, so we’ve outlined some frequently asked questions. Read more about the best ...
Top answer
1 of 1
605

Warning!

This is a list of random books of diverse quality. In the view of some people (with some justification), it is no longer a list of recommended books. Some of the listed books contain blatantly incorrect statements or teach wrong/harmful practices. People who are aware of such books can edit this answer to help improve it. See The C book list has gone haywire. What to do with it?, and also Deleted question audit 2018.

Reference (All Levels)

  • The C Programming Language (2nd Edition) - Brian W. Kernighan and Dennis M. Ritchie (1988). It is still a good, short, but complete, introduction to C (C89, not C99 or later versions), written by the inventor of C. However, the language has changed and good C style has developed in the last 25 years, and there are parts of the book that show its age.

  • C: A Reference Manual (5th Edition) - Samuel P. Harbison and Guy R. Steele (2002). An excellent reference book on C, up to and including C99. It is not a tutorial, and probably unfit for beginners. It's great if you need to write a compiler for C, as the authors had to do when they started.

  • C Pocket Reference (O'Reilly) - Peter Prinz and Ulla Kirch-Prinz (2002).

  • The comp.lang.c FAQ - Steve Summit. Web site with answers to many questions about C.

  • Various versions of the C language standards can be found here. There is an online version of the draft C11 standard.

  • The new C standard - an annotated reference (Free PDF) - Derek M. Jones (2009). The "new standard" referred to is the old C99 standard rather than C11.

  • Rationale for C99 Standard.


Beginner

  • C Programming: A Modern Approach (2nd Edition) - K. N. King (2008). A good book for learning C.

  • Programming in C (4th Edition) - Stephen Kochan (2014). A good general introduction and tutorial.

  • C Primer Plus (5th Edition) - Stephen Prata (2004)

  • A Book on C - Al Kelley/Ira Pohl (1998).

  • The C Book (Free Online) - Mike Banahan, Declan Brady, and Mark Doran (1991).

  • C: How to Program (8th Edition) - Paul Deitel and Harvey M. Deitel (2015). Lots of good tips and best practices for beginners. The index is very good and serves as a decent reference (just not fully comprehensive, and very shallow).

  • Head First C - David Griffiths and Dawn Griffiths (2012).

  • Beginning C (5th Edition) - Ivor Horton (2013). Very good explanation of pointers, using lots of small but complete programs.

  • Sams Teach Yourself C in 21 Days - Bradley L. Jones and Peter Aitken (2002). Very good introductory stuff.

  • C In Easy Steps (5th Edition) - Mike McGrath (2018). It is a good book for learning and referencing C.

Intermediate

  • Modern C — Jens Gustedt (2017 1st Edn; 2019 2nd Edn). Covers C in 5 levels (encounter, acquaintance, cognition, experience, ambition) from beginning C to advanced C. It covers C11 and C17, including threads and atomic access, which few other books do. Not all compilers recognize these features in all environments.

  • C Interfaces and Implementations - David R. Hanson (1997). Provides information on how to define a boundary between an interface and implementation in C in a generic and reusable fashion. It also demonstrates this principle by applying it to the implementation of common mechanisms and data structures in C, such as lists, sets, exceptions, string manipulation, memory allocators, and more. Basically, Hanson took all the code he'd written as part of building Icon and lcc and pulled out the best bits in a form that other people could reuse for their own projects. It's a model of good C programming using modern design techniques (including Liskov's data abstraction), showing how to organize a big C project as a bunch of useful libraries.

  • The C Puzzle Book - Alan R. Feuer (1998)

  • The Standard C Library - P.J. Plauger (1992). It contains the complete source code to an implementation of the C89 standard library, along with extensive discussions about the design and why the code is designed as shown.

  • 21st Century C: C Tips from the New School - Ben Klemens (2012). In addition to the C language, the book explains gdb, valgrind, autotools, and git. The comments on style are found in the last part (Chapter 6 and beyond).

  • Algorithms in C - Robert Sedgewick (1997). Gives you a real grasp of implementing algorithms in C. Very lucid and clear; will probably make you want to throw away all of your other algorithms books and keep this one.

  • Pointers on C - Kenneth Reek (1997).
  • Problem Solving and Program Design in C (6th Edition) - Jeri R. Hanly and Elliot B. Koffman (2009).

  • Data Structures - An Advanced Approach Using C - Jeffrey Esakov and Tom Weiss (1989).

  • C Unleashed - Richard Heathfield, Lawrence Kirby, et al. (2000). Not ideal, but it is worth intermediate programmers practicing problems written in this book. This is a good cookbook-like approach suggested by comp.lang.c contributors.

  • Object-oriented Programming with ANSI-C (Free PDF) - Axel-Tobias Schreiner (1993). The code gets a bit convoluted. If you want C++, use C++. It only uses C90, of course.

Expert

  • Expert C Programming: Deep C Secrets - Peter van der Linden (1994). Lots of interesting information and war stories from the Sun compiler team, but a little dated in places.

  • Advanced C Programming by Example - John W. Perry (1998).

  • Advanced Programming in the UNIX Environment - Richard W. Stevens and Stephen A. Rago (2013). Comprehensive description of how to use the Unix APIs from C code, but not so much about the mechanics of C coding.


Uncategorized

  • Essential C (Free PDF) - Nick Parlante (2003). Note that this describes the C90 language at several points (e.g., in discussing // comments and placement of variable declarations at arbitrary points in the code), so it should be treated with some caution.

  • C Programming FAQs: Frequently Asked Questions - Steve Summit (1995). This is the book of the web site listed earlier. It doesn't cover C99 or the later standards.

  • C in a Nutshell - Peter Prinz and Tony Crawford (2005). Excellent book if you need a reference for C99.

  • C in a Nutshell (2nd Ed.) - Peter Prinz and Tony Crawford (2016), a reference-style book covering C11.

  • Functional C - Pieter Hartel and Henk Muller (1997). Teaches modern practices that are invaluable for low-level programming, with concurrency and modularity in mind.

  • The Practice of Programming - Brian W. Kernighan and Rob Pike (1999). A very good book to accompany K&R. It uses C++ and Java too.

  • C Traps and Pitfalls by A. Koenig (1989). Very good, but the C style pre-dates standard C, which makes it less recommendable these days.

    Some have argued for the removal of 'Traps and Pitfalls' from this list because it has trapped some people into making mistakes; others continue to argue for its inclusion. Perhaps it should be regarded as an 'expert' book because it requires moderately extensive knowledge of C to understand what's changed since it was published.

  • MISRA-C - industry standard published and maintained by the Motor Industry Software Reliability Association. Covers C89 and C99.

    Although this isn't a book as such, many programmers recommend reading and implementing as much of it as possible. MISRA-C was originally intended as guidelines for safety-critical applications in particular, but it applies to any area of application where stable, bug-free C code is desired (who doesn't want fewer bugs?). MISRA-C is becoming the de facto standard in the whole embedded industry and is getting increasingly popular even in other programming branches. There are (at least) three publications of the standard (1998, 2004, and the current version from 2012). There is also a MISRA Compliance Guidelines document from 2016, and MISRA C:2012 Amendment 1 — Additional Security Guidelines for MISRA C:2012 (published in April 2016).

    Note that some of the strictures in the MISRA rules are not appropriate to every context. For example, directive 4.12 states "Dynamic memory allocation shall not be used". This is appropriate in the embedded systems for which the MISRA rules are designed; it is not appropriate everywhere. (Compilers, for instance, generally use dynamic memory allocation for things like symbol tables, and to do without dynamic memory allocation would be difficult, if not preposterous.)

  • Archived lists of ACCU-reviewed books on Beginner's C (116 titles) from 2007 and Advanced C (76 titles) from 2008. Most of these don't look to be on the main site anymore, and you can't browse that by subject anyway.


Warnings

There is a list of books and tutorials to be cautious about at the ISO 9899 Wiki, which is not itself formally associated with ISO or the C standard, but contains information about the C standard (though it hails the release of ISO 9899:2011 and does not mention the release of ISO 9899:2018).

Be wary of books written by Herbert Schildt. In particular, you should stay away from C: The Complete Reference (4th Edition, 2000), known in some circles as C: The Complete Nonsense.

Also do not use the book Let Us C (16th Edition, 2017) by Yashavant Kanetkar. Many people view it as an outdated book that teaches Turbo C and has lots of obsolete, misleading and incorrect material. For example, page 137 discusses the expected output from printf("%d %d %d\n", a, ++a, a++) and does not categorize it as undefined behaviour as it should. It also consistently promotes unportable and buggy coding practices, such as using gets, %[\n]s in scanf, storing the return value of getchar in a variable of type char or using fflush on stdin.

Learn C The Hard Way (2015) by Zed Shaw. A book with mixed reviews. A critique of this book by Tim Hentenaar:

To summarize my views, which are laid out below, the author presents the material in a greatly oversimplified and misleading way, the whole corpus is a bundled mess, and some of the opinions and analyses he offers are just plain wrong. I've tried to view this book through the eyes of a novice, but unfortunately I am biased by years of experience writing code in C. It's obvious to me that either the author has a flawed understanding of C, or he's deliberately oversimplifying to the point where he's actually misleading the reader (intentionally or otherwise).

"Learn C The Hard Way" is not a book that I could recommend to someone who is both learning to program and learning C. If you're already a competent programmer in some other related language, then it represents an interesting and unusual exposition on C, though I have reservations about parts of the book. Jonathan Leffler


Outdated

  • Practical C Programming (3rd Edition) - Steve Oualline (1997)(Beginner)

Other contributors, not necessarily credited in the revision history, include: Alex Lockwood, Ben Jackson, Bubbles, claws, coledot, Dana Robinson, Daniel Holden, desbest, Dervin Thunk, dwc, Erci Hou, Garen, haziz, Johan Bezem, Jonathan Leffler, Joshua Partogi, Lucas, Lundin, Matt K., mossplix, Matthieu M., midor, Nietzche-jou, Norman Ramsey, r3st0r3, ridthyself, Robert S. Barnes, smalinux, Steve Summit, Tim Ring, Tony Bai, VMAtm

🌐
Quora
quora.com › What-is-the-most-efficient-way-to-learn-C-programming-How-much-time-does-it-usually-take-to-become-proficient-in-C-programming
What is the most efficient way to learn C programming? How much time does it usually take to become proficient in C programming? - Quora
Answer: Learning the language takes a weekend, for someone who understand how to program. IMO. Took me a weekend. I never felt fully proficient. The reason being, there’s too many ways to screw up. Strings for example, were a pain to get correct. We should have unit tested every function ever wr...