Free · Open source · No sign-up
Learn C from the ground up.
38 small, runnable programs take you from your first printf to
pointers, memory, sockets, threads and a terminal game you build yourself.
$ cc -Wall -Wextra -std=c17 -o 1_hello_world 1_hello_world.c
$ ./1_hello_world
Hello, World!
$ ▌How it works
-
Read the program
Every lesson is one small C file. The explanation lives in its comments, right next to the code it explains.
-
Compile it yourself
Each page gives you the exact commands for macOS, Linux and Windows (WSL). No IDE, no magic.
-
Run it and change it
See what it does, then break it on purpose. The fastest way to learn C is to argue with a compiler.
The path
Six parts, each building on the last. Earlier lessons only use what you have already learned.
Part 1
The Beginner Path — Core Concepts
Core language fundamentals from Hello World through strings.
Part 2
The Intermediate Path — Deeper into C
Pointers, structs, dynamic memory, file I/O, and command-line arguments.
Part 3
The Advanced Path — Towards Mastery
Projects and deeper topics including function pointers, recursion, linked lists, bit manipulation, and a line-based text editor.
Part 4
The Expert Path — Systems and Concurrency
Systems programming with sockets, process management, hash tables, and multithreading.
Part 5
Expert Systems and Application Development
Multi-file projects, external libraries, terminal UI with ncurses, data parsing, and a capstone text adventure.
Part 6
The Toolsmith Path — Debugging, UB and Testing
Debugging with gdb and lldb, undefined behavior and the sanitizers, and testing in C.
All you need is a terminal.
Install a compiler once with the setup guide, then work through the lessons at your own pace. Prefer to read offline? The course is also a book, and every file is on GitHub.
Start lesson 1