Ready to master the C language from the ground up? Whether you're just starting out or diving deep into system-level wizardry, learn_c is your hands-on guide to becoming fluent in one of the most powerful programming languages ever created.
This repo is a curated journey through C programming, organized into progressive levels:
- 🟢 Beginner – Syntax, variables, loops, functions, and more
- 🟡 Intermediate – Pointers, memory, files, recursion, and debugging
- 🔴 Advanced – Data structures, multithreading, system-level programming
- 🟣 Expert –Topic-focused deep dives into system design, security, networking, and compiler internals (no code examples or exercises—just pure knowledge to explore)
- 📚 Clear, modular lessons with real code examples
- 🧪 Ten exercises in each section to reinforce learning
- 🛠️ Final project challenges to test your skills
So grab your compiler, crack open a terminal, and let’s get coding.
C ya in the code! 😉
Important
Not all exercise solutions are complete yet—I'm solving them as I learn, so this repo grows with me.
🕵 Spot a bug, typo, or something funky in the repo?
I’m learning as I build, so if you catch anything off, feel free to open an issue or drop a comment.
Let’s debug this journey together—because even C code deserves a second chance 😉
W3School
GNU C Manual
C Language Reference
- Setting up the development environment (compiler, IDE)
- Basic syntax and structure of a C program
- Data types and variables
- Operators (arithmetic, relational, logical)
- Functions and function prototypes
- Control flow: if, else, switch
- Loops: for, while, do-while
- Input and output functions
- Scope and lifetime of variables
- Arrays and strings
- Pointers basics
- Advanced pointer operations
- Dynamic memory allocation (malloc, calloc, free)
- Structures and unions
- File handling (read/write binary and text files)
- Recursion
- Bitwise operations
- Enumerations
- Command-line arguments
- Header files and modular programming
- Error handling and debugging techniques
- Linked lists (singly, doubly, circular)
- Stacks and queues
- Trees and binary search trees
- Sorting and searching algorithms
- Hash tables
- Memory management and leaks
- Function pointers and callbacks
- Macros and preprocessor directives
- Multithreading (POSIX threads)
- Interfacing with hardware or embedded systems
- Writing and using libraries
- Understanding compilation process (preprocessing, compiling, linking)
- Makefiles and build automation
- C with assembly (inline assembly)
- C in system-level programming (OS, drivers)
Each level comes with fun, hands-on projects to help you apply what you've learned. From tiny tools to terminal adventures—these are your coding quests!
-
🧮 Tiny Calculator
Your first math buddy! Add, subtract, multiply, and divide like a pro—with functions doing the heavy lifting. -
🎯 Guess the Number
The computer picks a number. You try to guess it. It taunts you with “higher” or “lower” until you win. Or rage quit. -
📊 Grade-o-Matic
Enter student scores, calculate averages, and hand out virtual gold stars (or gentle reminders to study harder). -
🏧 ATM Simulator
Simulate checking your balance, depositing imaginary cash, and withdrawing like a boss—with a menu-driven interface. -
🌡️ Temp Transformer
Convert between Celsius, Fahrenheit, and Kelvin. Because science is cool. Literally.
-
📇 Contact Book 2.0
Store names, numbers, and secrets. Search, edit, and save them to a file—like a digital diary with structs. -
🐍 Classic Snake Game
Navigate your snake through the terminal jungle. Eat, grow, and avoid crashing—pure retro fun powered by C logic. -
📦 Dynamic Array Manager
Build your own resizable array usingmallocandrealloc. It’s like giving your variables superpowers. -
🧠 Quiz Master
Load questions from a file, track scores, and challenge your friends. Bonus points if you make it snarky. -
📁 Text File Analyzer
Feed it a file. It’ll count words, lines, letters, and maybe judge your writing habits.
-
📚 Library Management System
Use linked lists to track books, borrowers, and overdue fines. No actual librarians were harmed. -
🧩 Maze Solver
Generate a maze and escape it using recursion or algorithms. Bonus: make it visual in the terminal! -
🚀 Multithreaded Download Simulator
Pretend to download files using threads. Watch your fake progress bars fly! -
🧠 Custom Memory Allocator
Build your own version ofmalloc. Manage memory like a boss. Just don’t leak it everywhere. -
🛠️ Mini Compiler Front-End
Create a lexer and parser for a tiny language. Teach your code to read code. Meta, right?