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.
🌐
Reddit
reddit.com › r/c_programming › what is the best way to learn c today?
r/C_Programming on Reddit: What is the best way to learn C today?
December 22, 2023 -

Also, if you want, you can share about how you learned the C language, and maybe give some tips on how to do it more effectively.

Top answer
1 of 29
199
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
2 of 29
15
Pick a project and do it in C. If you hit an issue, find by doing.
🌐
Reddit
reddit.com › r/c_programming › where and how to learn c?
r/C_Programming on Reddit: Where and how to learn C?
February 12, 2023 -

What resources did you use to learn C ? As a beginner to C, I'm finding it really difficult to pick up the language from just reading about the syntax rules. Are there any good resources / books / youtube videos to not only learn the syntax, but also the more advanced concepts (pointers, scope, etc)?

Edit: I know learning how to code takes time, but I'd prefer resources that wouldn't be so time consuming. More of a resource that I could approach when I'm stuck on a single topic

Top answer
1 of 23
256
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
2 of 23
16
Run through basic syntax for free on learn-c.org. Start solving real problems quickly with https://www.codestepbystep.com/problem/list/c If you are not adverse to learning from books, get The C Programming Language 2nd Edition, it gives you little examples and tasks to explore in every chapter. Whenever you do anything to learn, never copy-paste. Always type the code in your own editor. This helps you build knowledge of syntax and constructs.
🌐
Reddit
reddit.com › r/c_programming › best website to learn c
r/C_Programming on Reddit: best website to learn c
January 24, 2024 -

hi i am a college student i want to learn c because this semester i will learn it i have learned python alone with pynative and w3school can you reccomend a free website to learn c with exercice , lesson and exemple (like pynative ) please

🌐
Reddit
reddit.com › r/c_programming › can anyone recommend a good source to learn c for someone who already knows the basics of programming?
r/C_Programming on Reddit: Can anyone recommend a good source to learn C for someone who already knows the basics of programming?
July 12, 2024 -

So, I've done some Python and some Go already and I don't want to learn C as if I am completely a beginner. I want to learn the unique parts of C but don't need to be taught what a for loop is or anything. Ideally, I'd love something that would walk through teaching me C while at the same time pointing out what is different from other languages. Like if someone was learning Go I might not teach them what a for loop is but I would teach them that Go has 4 basic versions and there's no such thing as a while loop.
I'm by no means an expert in programming with either Go or Python but I know the basics.

Any youtube video/series that won't spend a lot of time teaching me stuff that's unnecessary. I'm reading a book on Operating Systems (OSTEP) and I just want C to follow the exercises and write little 'scripts' to check my understanding.

🌐
Reddit
reddit.com › r/c_programming › looking for the ultimate guide to learning c: from noob to pro
r/C_Programming on Reddit: Looking For The Ultimate Guide to Learning C: From Noob To Pro
April 8, 2024 -

Hey fellow C programmers!

I'm really eager to understand computers better, to get into the nuts and bolts of how things work under the hood, but it seems like a lot of the YouTube tutorials out there just skim the surface. idk I feel like they don't go into the advanced topics that I'm really curious about and it feels like I'm missing out on a lot.

So I'm on the lookout for a great course or resource that can help me learn the C language while also diving deep into the inner workings of computers. I want something that starts at a beginner level but goes into detail explaining why things work the way they do. And since I'm more of a visual learner I prefer video tutorials over reading :D

Any recommendations?

Top answer
1 of 5
21
Well if that's the approach you want to take, which is the proper one IMO, you're going to want to start out with how CPUs work and things related to that. And I would even say learn some assembly. I'm not saying become an expert at it, but maybe spend a week or two solid writing it before jumping up to C. As for video courses specifically, there's this one channel called Portfolio Courses on YT. His videos are pretty decent. I'm sure if you searched on the O'Reilly website (which you should be able to access for free with your library card), you'd probably find some video courses. I'm the exact opposite though. I'm almost a 100% book learner, so sorry I couldn't help out more.
2 of 5
12
There is no such thing as a guide that makes you pro. You need to put in the effort and learn to understand C deeply over a time span of few years by using the language for whatever you want to use it and learning about subtle technical details. You need to find information from multiple sources because no source of information can give you everything you need. You might believe that you are a visual learner but that might be because videos spoon feed you with a ready made solution by directly showing you what to do without you having to think much and make you think that you are learning quickly. You might think for example that you understand how scanf function works when a video shows you how to read input from the user, but you end up writing code that is vulnerable to buffer overflow or causes undefined behavior because you really don't understand how it work because you haven't read and understood the details which you cannot most likely find in any video. Also some information cannot be found at least easily even just by googling and only exists in books, documentation, research papers or is learned by reading the source code of a program you want to understand.
Find elsewhere
🌐
Reddit
reddit.com › r/learnprogramming › where should i learn c?
r/learnprogramming on Reddit: Where should I learn C?
November 23, 2015 -

I have programming experience in Java, but I have to learn C this semester. Are there any online courses you guys could recommend? I tried code academy but its not there. I'd prefer something other than a book if possible. Any help is appreciated

🌐
Reddit
reddit.com › r/c_programming › how do i go about learning c as a first language?
r/C_Programming on Reddit: How do I go about Learning C as a first language?
February 28, 2022 -

I want to start learning C (or Assembly) as a first language. For weeks I've been thinking about both C and Assembly and no other language interests me. I have no background in CS or anything, I just want to learn C most because I have interests in niche fields where C and Assembly are used (rom hacking retro games, reverse engineering, malware, security, etc.). I know that python gets used in those fields as well (although I don't think it's used in rom hacking not that I'm aware of) and I'm always told to learn Python first, it's easier and you get better jobs but I don't have any interest in python in fact, I'm getting sick and tired of hearing about python. I'm not doing this for job prospects, higher pay or anything. I just have very specific needs that don't involve python.

I'm always around people who show off their projects in C and Assembly and I just think what these people make are cool and I want to contribute as soon as I can. I just don't think I would be happy learning a language I'm dead set on not wanting to learn but I have some clue on what I want to do with C and assembly in the future or even now. Its just I see comments online and even in the C beginner books that tell me that I need to know python or another language first to learn C. A lot of you guys learned it as your first language, how did you go about learning it?

🌐
Reddit
reddit.com › r/c_programming › best ways to learn c, recommend
r/C_Programming on Reddit: best ways to learn C, recommend
April 22, 2024 - 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
🌐
Reddit
reddit.com › r/c_programming › what's the easiest way properly learn c?
r/C_Programming on Reddit: What's the easiest way properly learn C?
December 3, 2023 -

Hello everyone! I'd like to get some recommendations on MOOCs, screencasts, tutorials or books that talk to me like I'm five and go with me as in a pairing session building something cool & non-trivial (compilers, networking, databases, os, schedulers, file systems, etc).

Allow me to write a bit of background on my experience - I majored in CS but I never had a course on C, the syllabus was all Java; over the years I've been on an off trying to learn C I'm comfortable with the syntax (when it's sanely written), however never built anything big on it, since I started programming professionally I always focused on web applications using PHP, Java, Python and JavaScript but nothing to difficult, just the usual boring CRUD web applications, always using frameworks that were too magical for me to understand what was going on under the hood, I always got a thing on learning programming languages but I always pick higher level languages; almost 10 years later and I now make a living using Haskell pretty much doing the same; but in the back of my mind I don't feel complete because I never did lower level languages or systems programming of any sort, so I want to "master" C and have some exposure to it as if I did a strong foundations course in C.

Since a couple months ago I started reading "Beej's Guide to C Programming" I like a lot his style of writing, what I don't like is that there are no exercises and I feel like I'm not flexing any muscles, I'm over 60% there on the book (excluding the reference part) and today I tried to supplement my learning with a project-based book "Crafting Interpreters by Nystrom", right from the get-go one of the first "challenges" is to build a double-linked list, I won't lie but after lots of googling and chatgpt orientation it took me a whole afternoon just to build insertion of elements on my own (no fetching, deletion or updates), like even setting up a Makefile because I didn't know I had to use tabs for indenting!. So I think I severely lack understanding of the language or data structures, I don't know! (like I always got lists or hashmaps for granted, never questioning how they work); now, I could continue wrestling the challenges in the book, but I also don't want to take forever on completing a C book.

So ideally I would like a course that goes hand in hand with the student to build cool non-trivial stuff explaining every detail. A format that I like very much is when they go to the point, as an example see a screencast by Jeffrey Way: https://www.youtube.com/watch?v=y2EjzBAFffo I don't know if something similar exists for C with lower level interesting projects.

Please masters, teach me! help me gain the powers reserved only to the true hackers!

EDIT: Can't change the title, but I guess what I'm looking for is for the "smartest efficient way to learn C without taking ages".

🌐
Reddit
reddit.com › r/c_programming › absolute best way to learn c as a complete coding beginner?
r/C_Programming on Reddit: Absolute best way to learn C as a complete coding beginner?
August 1, 2024 -

Edit: Appreciate all the resources and advice, will take them all into account. Thanks

Yes, I know this question has been asked a million times here. However, I’m more of a hands on learner and when most people ask this question they get recommended books and videos so I wanted to ask if there a website/course that has coding exercises that start from the absolute basics and build up gradually? I’d like to learn practically by actually coding but don’t know what programs to write as a beginner and how to expand on that. My university recommended the K&R C programming book. I don’t mind books but sometimes I don’t understand what the book says. I did watch a 4 hour video by freecodecamp and found it quite helpful. I was basically coding exactly what he was and understood some of the data types and basic functions like scanf. However some of the more complex functions like pointers, while and for loops just went into one ear and came out the other and didn’t really know how to do it after the video. Would appreciate any advice

🌐
Reddit
reddit.com › r/c_programming › where can i learn c?
r/C_Programming on Reddit: Where can I learn C?
December 8, 2023 -

So I wanna learn C programming, and I was wondering what websites and YouTube channels I could use. Also if it helpzs, I did C programming in school last year so I am not a total beginner, but I still have stuff to learn and would like to gain more knowledge, maybe I'll even get a minijob later

Hope someone can help me

Edit: just wanted to say thanks to everyone for the recommendations, I'll try and see what's best for me

Top answer
1 of 21
14
IMO Handmade Hero is the best "General C Programming" resource today. I've read the books recommended so far in the comments and most of those practices are simply outdated. I suggest being wary about these "Modern" books/courses as well as K&R as they tend to make the same mistakes we've already learned to avoid over the years. So if you're not a total beginner, I recommend just skipping them. There are more C resources that are great for specific topics (compilers, optimization, game engines, data-oriented design, arena allocators, ui, etc.), but Handmade Hero is the only one that covers most of the fundamentals and gives you a baseline understanding of what a decent C codebase looks like today. Other more specific topics: Compilers: Bitwise by Per Vognsen (Youtube) Optimization: Performance-Aware Programming Series by Casey Muratori (Substack) Game Engines: Hero_Dev_Vods (Youtube) Data Oriented Design: Mike Acton (Substack) Arena Allocators & UI: Ryan Fleury (Substack)
2 of 21
10
Realize that coding a language such as C is equally as much an academic endeavour as much as a craft. Reading alone won't cut it. You have to get your hands dirty at the same time. This means battling the unforgiving compiler, the unforgiving crashes once you finally have something that compiles, learning how to use a debugger, learning how your build system works. In fact, I would start at that end. Get a book to enhance the rudimentary knowledge you get by following online tutorials.
🌐
Reddit
reddit.com › r/c_programming › best youtube channel to learn c programming
r/C_Programming on Reddit: Best youtube channel to learn C Programming
July 28, 2024 - There is no such thing as the "best" YouTube channel when it comes to learning, but from my experience here's some of the most fun and intuitive channels to help you learn C the right way · Jacob Sorber, Neso Academy, Bro Code, and Portfolio ...
🌐
Reddit
reddit.com › r/c_programming › how to really learn c ?
r/C_Programming on Reddit: How to REALLY LEARN C ?
September 30, 2020 -

I started learning C a month ago and before then i was programming using other languages and frameworks. So now i learned the C language basics (variables, functions, pointers, etc…) but till now i haven’t really made any actual project and i really don’t know how to put these things to use and so i think that maybe the best way to learn is to look at actual projects made with C so can you please recommend open source projects made with C but small one like 10 files max in order to get the hang of things not some thousand file projects and also if you have any other recommendations to learn C effectively then feel free to share it will be appreciated.

Top answer
1 of 5
95
Suggest creating small projects/libraries on your own. Something that's been done countless times before - a CRC32 generator, a logging library, an image reader/writer, TCP server/client, lossless compression, timers, etc. Research the topic at a high-level, implement it on your own, then go find other examples and see how they compare. Were they more robust? Cross-platform? Better organized? Well-tested? Did you miss a common use case? Is performance an issue? Then refactor your code with some lessons learned. Keep this code and revisit it as you progress. Refactor it again and again. Basically build up your own personal repo of well-honed libraries.
2 of 5
44
I feel like there are a few C "milestones" when you're learning, moments when you advance to the next level. Such as: When you stop fighting against adding .h/.c pairs, because you know it makes sense. When you stop writing command-line gcc commands and start writing makefiles. When you stop avoiding pointers and just accept their usefulness. When you realize the answer to many of your problems is using structs. When your start building functions that take struct pointers as arguments. When you no longer fear malloc(). When you are comfortable with bit-fiddling. Reading code written by other people doesn't help with any of these things. The only way it happens is by writing code. If it takes 500 hours of coding to get through the list, all I can suggest is that you start now. C is a very small language. The trick is internalizing the methods that C requires you to use, and gaining comfort with the tools it gives you.
🌐
Reddit
reddit.com › r/learnprogramming › is learning c programming from scratch still valuable in 2025?
r/learnprogramming on Reddit: Is learning C programming from scratch still valuable in 2025?
February 8, 2025 -

I’m a computer science student with a solid background in programming and experience in languages like PHP, JavaScript, and Python. While I’m still learning, many of my seniors and professors suggest that to build a strong foundation as a programmer, I should focus on languages like C, C++, or Java instead of the ones I’m currently working with. The reason is that C and Java are considered more fundamental to understanding core programming concepts. However, I’m in my final year, and as I prepare for placement drives, I’ve noticed that most companies focus on languages like C and Java during interviews. Even though I have strong projects in Python and JavaScript, they’re often overlooked because they see these languages as “easier” or “modular.”

Additionally, for my goal of pursuing a master’s degree from a top government college, I need to pass an entrance exam where they primarily focus on C and C++ programming. I’ve realized that a solid understanding of C will open up more opportunities, but I’m uncertain how to learn it from scratch. I bought a book called "Programming with C," but I’m concerned it will take too long to cover everything, especially since I’m starting from the basics. My main question is: How do I effectively learn C from scratch to an intermediate level, where I can confidently write logical programs? I don’t have much time, and I’m unsure how much effort it will take.

I know many resources are available online, such as documentation, YouTube tutorials, and other websites, but I’m feeling overwhelmed and unsure of the best path to follow. I’m hoping someone can guide me, like a big brother, on how to approach learning C in a structured way. Ideally, I want to become proficient in C within a month. Any advice or suggestions on how to achieve this would be greatly appreciated!

🌐
Reddit
reddit.com › r/c_programming › i want to start learning c but don't know where to begin.
r/C_Programming on Reddit: I want to start learning C but don't know where to begin.
February 18, 2023 -

I want to get in on learning C and programming in it. But I have no idea where to start. What programs should I get? I'm using windows and green when it comes to it.

Top answer
1 of 5
25
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
2 of 5
5
You should do more research and watch a couple of videos on the topic. I can assure you that YouTube is flooded with tutorials, pick up the one that you are comfortable with, and discipline yourself to stick to it.