A language from 1972 that is still underneath everything you use. Small enough to hold entirely in your head, close enough to the machine that reading it teaches you what the machine does, and unsafe enough that it has generated most of the security industry.

~19,000 words across 13 notes. Built August 2026, cross-referenced against roadmap.sh C++ and the C standard.

Source: [reference]. No C project in this vault yet. The first one belongs in Project Ideas — and C is the language where the gap between reading and building is widest, because the failure modes are silent. Reading is not a rank.

The honest framing, having just done Rust: C gives you no safety at all. No bounds checks, no ownership, no lifetimes, no null protection, no destructors, no strings, no collections. There is you, and there is what the machine does. That’s why ~70% of serious vulnerabilities in large C/C++ codebases are memory-safety bugs — not because C programmers are careless, but because the language provides no mechanism to be careful with.

Learn C to understand the machine and to read the world’s infrastructure. Reach for it on new projects only when you genuinely need it.

Reading order

The model

  1. Why C, and the Compilation Model — [Beginner] — why it’s still everywhere, the four-stage pipeline, and reading compiler vs linker errors
  2. Headers and the Translation Unit — [Beginner → Intermediate] — the note that makes C make sense. Why .h/.c exists at all, declaration vs definition, include guards, static, and opaque types
  3. The Preprocessor — [Beginner → Intermediate] — text substitution that knows no C, the four macro traps, and conditional compilation

The type system, such as it is

  1. Types and Integers — [Beginner → Intermediate] — sizes that aren’t fixed, integer promotion, and the signed/unsigned comparison that has caused real CVEs
  2. Pointers — [Beginner → Intermediate] — addresses, arithmetic, void *, function pointers, and every way they go wrong
  3. Arrays, Strings and Decay — [Beginner → Intermediate] — the decay rule, why a function can’t know an array’s size, and strings as a convention rather than a type

Managing memory yourself

  1. Memory Management — [Intermediate] — stack/heap/static, malloc/free, the full catalogue of failures, ownership discipline, and goto cleanup
  2. Structs, Unions and Layout — [Intermediate] — padding and alignment, flexible array members, tagged unions built by hand, bitfields

Using it

  1. The Standard Library — [Intermediate] — how little there is, and which parts are traps
  2. Undefined Behaviour — [Intermediate → Advanced] — not “unpredictable output” but a licence for the compiler to assume your code can’t do what it does. Read this one properly
  3. Modular C and Project Structure — [Intermediate] — the conventions that substitute for language features

Tooling

  1. Build Systems — [Intermediate] — make from first principles, CMake, and the honest state of C dependency management
  2. Debugging and Tooling — [Intermediate → Advanced] — sanitizers, Valgrind, gdb, perf, fuzzing. In a language with no safety net, the tooling is the safety net

The two notes that matter most

If you read nothing else:

  • 02 — Headers and the Translation Unit, because the compiler sees one .c file and nothing else, and every convention in C follows from that. It also makes C++, FFI boundaries, and half of every build error comprehensible.
  • 10 — Undefined Behaviour, because the common mental model is wrong. UB isn’t a runtime accident; it’s a property of the program that lets the optimiser delete your null checks. It explains “worked at -O0, broke at -O2” permanently.

Where the frameworks are

Per the vault rule:

→ backend/frameworks/c/ — libmicrohttpd, Kore, Ulfius, civetweb

Including the honest question of when a C web server is a real answer and when it’s a bad idea.

C, Rust and Go side by side

All three are now in the vault, and the comparison is the fastest way to see what each is for:

CGoRust
Memorymanual malloc/freeGCcompile-time ownership
Safetynonememory-safe, races possiblememory-safe, races impossible
Learning curvesmall language, endless pitfallsdaysweeks to months
Compile speedvery fastvery fastslow
RuntimenoneGC + schedulernone
Dependenciesno package managermodulescargo
Best forkernels, embedded, ABI boundariesservices, infra toolingsystems where safety must be proven

C’s remaining unassailable niches: the ABI everything speaks, targets with no other toolchain, and the tens of millions of existing lines.

Known gaps

  • No project. The largest gap
  • Concurrency — pthreads, C11 <threads.h>, atomics and the memory model get a mention and no note. It’s a real omission; the material lives partly in OS Fundamentals
  • Signals — signal/sigaction and async-signal-safety
  • Embedded C specifically — freestanding implementations, linker scripts, volatile for registers. Adjacent to hardware/
  • C23 — mentioned, not covered in depth

↑ Back to Languages