⚠ C has no safety nets. Buffer overflows, use-after-free, and memory leaks are not caught at compile time or by a runtime. Always compile with -Wall -Wextra and run your code with -fsanitize=address,undefined during development. Understanding C makes you a better programmer in every other language.
Foundations
Variables, control flow, functions, and first pointers
- Variables, types, and operators
- Control flow: if, for, while, switch
- Functions, return values, and scope
- Pointers: &, *, and pass-by-pointer
- Arrays and the decay rule
Practitioner
Structs, heap memory, strings, and the preprocessor
- Structs: typedef, member access, padding
- Heap memory: malloc, realloc, free
- Strings: null termination, strcpy, snprintf
- The preprocessor: #define, #include, macros
- File I/O: fopen, fprintf, fclose
Advanced
Pointer arithmetic, undefined behaviour, linked lists, and POSIX
- Pointer arithmetic and multi-level pointers
- Undefined behaviour and sanitisers
- Linked lists and dynamic data structures
- Function pointers and callbacks
- POSIX: processes, signals, and sockets basics
Practice environment
Run C in your browser — no installation needed. Or use GCC/Clang locally with sanitisers.
Compiler Explorer → Repl.it C →