Stage 0 — Setup (1 week)
- A POSIX environment (Linux / macOS / WSL2 on Windows).
gccorclangcompiler +make.- Editor: VS Code with C/C++ extension, or vim/emacs if you're brave.
Stage 1 — Core C (3-4 weeks)
- Hello world, compilation pipeline (
gcc -o hello hello.c). - Data types —
int,char,float,double, signed vs unsigned. - Operators, control flow, loops.
- Functions, recursion, variable scope.
- Arrays and strings.
- I/O —
printf,scanf,fgets,fprintf.
Project: Number-guessing game + calculator + word counter.
Stage 2 — Pointers (deep, 3 weeks)
- The big idea: a pointer holds an address.
- Address-of (
&) and dereference (*). - Pointer arithmetic.
- Pointers + arrays — array decay.
- Pointer to pointer.
- Function pointers (callbacks).
constpointers vs pointers to const.
Project: Hand-roll your own strlen, strcpy, strcmp, strstr.
Stage 3 — Memory Management (2 weeks)
- Stack vs heap.
malloc,calloc,realloc,free.- Memory leaks — find them with valgrind / AddressSanitizer.
- Dangling pointers, double free.
memcpy,memset,memmove.
Stage 4 — Structures + Files (2 weeks)
struct,union,enum,typedef.- Struct padding & alignment.
- Linked lists, trees, hash tables — hand-rolled.
- File I/O —
fopen,fread,fwrite,fseek. - Binary files vs text files.
Project: Build your own minimal database (single-file key-value store).
Stage 5 — The Preprocessor + Build System (1 week)
#define, function macros,#ifdef,#include.- Header files + include guards (
#ifndef X #define X). Makefilebasics.- Modern: CMake for multi-platform builds.
Stage 6 — Standard Library (2 weeks)
<string.h>,<stdlib.h>,<stdio.h>,<math.h>.<time.h>— wall clock + CPU time.<errno.h>— error handling conventions.<assert.h>.
Stage 7 — Systems Programming on Linux (4 weeks)
- POSIX file I/O —
open,read,write,close. - Process control —
fork,exec,wait. - Inter-process communication — pipes, FIFOs, signals.
- Threads —
pthread_create, mutexes, condition variables. - Network — sockets, TCP/UDP servers.
Project: Simple HTTP server in pure C.
Stage 8 — Tooling + Debugging (1 week)
- gdb — set breakpoints, inspect memory, backtrace.
- valgrind — find leaks and undefined memory reads.
- AddressSanitizer + UBSan + TSan (
-fsanitize=...). - gcov + lcov for coverage.
- Static analysis —
clang-tidy,cppcheck.
Stage 9 — Modern C (1 week)
- C99 additions —
bool, designated initialisers, variable-length arrays. - C11 —
_Static_assert,_Generic, threads.h. - C17 — bug fixes mostly.
- C23 — type inference,
nullptr, attributes.
Stage 10 — Specialise (ongoing)
Pick one:
- Embedded — STM32 / ESP32 / Arduino with bare metal C.
- Kernel — read the Linux kernel; submit a tiny patch.
- Game engines — graphics with OpenGL/Vulkan; high performance.
- Performance — write a tokenizer / parser / compiler.
- Security — exploit dev, fuzzing, reverse engineering.
Capstone Projects
- A toy compiler/interpreter for a simple language.
- A simple OS that boots on x86 QEMU (Operating Systems: Three Easy Pieces is the textbook).
- Contribute one patch to a real open-source C project (Linux, SQLite, redis, curl).
Time investment
Full-time: 4-6 months to comfortable.
Part-time (10 hr/week): 10-14 months.
C is unforgiving — it WILL teach you what other languages hide. Worth it.
