The series: 1 OS → 2 Networking → 3 Security → 4 HTTPS walkthrough, with Go alongside. Then the languages track: Go → C → Rust.
You are here: languages track, step 2: C. ← Previous: Go — The Complete Field Guide. Next: Rust — The Complete Field Guide →
New to the series? Start at step 1: Operating Systems, Linux, and Containers.
🛠️
C — The Complete Field Guide (Beginner → Expert)
A practical, example-driven path through C: what the language actually gives you, why it's shaped the way it is, and how to read and write C that solves real problems — from a CLI tool to a TCP server to the internals of SQLite and Redis.
Contents
64 chapters, one page each. Prefer one long page? Read the whole book on one page.
- How to use this guide2 min
- Table of contents3 min
- Part I — Foundations: the C way
- 1. What C is, why it still matters, and which C you're learning3 min
- 2. The toolchain: the four-stage pipeline, and your first program3 min
- 3. Types and the sizes the standard actually guarantees2 min
- 4. Operators, control flow, and the details beginners skip1 min
- 5. Functions, the stack, and header files1 min
- 6. Arrays, pointers, and the arithmetic that explains everything else4 min
- 7. Strings in C: buffers, ownership, and why gets() was removed5 min
- 8. Structs, unions, enums, typedef , and the preprocessor5 min
- 9. Mini projects: a unit converter and a word-frequency counter3 min
- Part II — Intermediate: memory, modules, and tooling
- 10. Dynamic memory: the malloc family, ownership, and the bugs it enables3 min
- 11. Pointers to pointers, function pointers, pointers to arrays2 min
- 12. File I/O: buffering, binary vs. text mode, errno1 min
- 13. Multi-file programs: headers, static , translation units, and make1 min
- 14. Debugging and sanitizers: gdb/lldb, Valgrind, ASan/UBSan1 min
- 15. A minimal test harness for C1 min
- 16. Mini projects: a dynamic-array library + CSV parser, and a JSON parser6 min
- Part III — Advanced: data structures, concurrency, networking
- 17. Bit manipulation and bit-fields1 min
- 18. Data structures from scratch: linked lists, stacks/queues, hash tables, trees3 min
- 19. Intrusive containers: the Linux kernel's container_of trick2 min
- 20. Concurrency: POSIX threads, mutexes/condvars, C11 <threads.h> and atomics2 min
- 21. Sockets: a TCP echo server, then a tiny HTTP server2 min
- 22. Variadic functions and _Generic1 min
- 23. Mini projects: a thread pool, and a select() -based chat server3 min
- Part IV — Real-world builds
- 24. Building production CLIs: argument parsing, config precedence, exit codes1 min
- 25. Capstone: a kilo -style terminal text editor2 min
- 26. Capstone: a Unix mini-shell with pipes and redirection2 min
- 27. Capstone: a bump/arena allocator2 min
- Part V — Security-focused C
- 28. Undefined behavior: the list every C programmer must memorize2 min
- 29. Buffer overflows, safe string handling, and CERT C rules2 min
- 30. Hardening: compiler flags, canaries, ASLR, _FORTIFY_SOURCE1 min
- 31. Fuzzing a real parsing bug with libFuzzer1 min
- 32. Static analysis: clang-tidy, cppcheck, the Clang Static Analyzer1 min
- Part VI — Open-source package walkthroughs
- 33. SQLite: the amalgamation, the VFS layer, opcode-based execution2 min
- 34. Redis: the ae.c event loop, sds dynamic strings, object encoding2 min
- 35. curl: the easy/multi handle design and callback-driven I/O1 min
- 36. cJSON: recursive-descent parsing and tagged unions1 min
- 37. uthash and klib: generics via macros1 min
- Part VII — Expert: internals, allocators, API design
- 38. The C11 memory model: atomics, ordering, lock-free basics1 min
- 39. Writing a real allocator: free lists, coalescing, and dlmalloc 's ideas2 min
- 40. ABI, linking, and designing a stable C API1 min
- 41. Cross-compilation and build systems at scale (CMake/Meson)1 min
- 42. Profiling: perf , cache-aware layout, and false sharing2 min
- 43. Capstone: a mini Redis-like key-value store with a wire protocol2 min
- Part VIII — Writing safe, leak-free C
- 44. Memory leaks, in depth: every shape they actually take in production4 min
- 45. Writing safe C: a defensive-programming checklist2 min
- 46. How NOT to write C: a bad-code/good-code anti-pattern catalog5 min
- Part IX — Hardware & driver programming
- 47. Two worlds: user-space hardware I/O vs. writing a kernel driver1 min
- 48. Talking to hardware from user space: GPIO, I2C, SPI, and serial4 min
- 49. Memory-mapped registers: volatile , /dev/mem , and memory barriers4 min
- 50. Your first Linux kernel module: hello world, the Makefile, insmod/dmesg1 min
- 51. Character device drivers: file_operations , cdev , and copy_to/from_user2 min
- 52. Interrupts and kernel concurrency: top/bottom halves, spinlocks vs. mutexes2 min
- 53. Debugging drivers: printk /dmesg, an oops backtrace, and QEMU+gdb2 min
- 54. Capstone: one sensor, driven two ways2 min
- Part X — Signals, non-local jumps, and memory-mapped files
- 55. Signals: handling asynchronous events safely4 min
- 56. Non-local jumps: setjmp / longjmp and why they're not exceptions2 min
- 57. Memory-mapped files: mmap for real files, msync , and shared mappings3 min
- Appendices
- A. C17 → C23: what's new, feature by feature1 min
- B. Undefined-behavior and pitfalls cheat sheet1 min
- C. Compiler-flags cheat sheet1 min
- D. Glossary1 min
- E. Further reading and real codebases worth reading1 min
Generated from real-life-c-guide.md · 8 Oct 2026 16:36