A personal learning repository documenting my journey through the C programming language, one small program at a time. Every solution here was written by hand while working through the fundamentals -- no copy-paste shortcuts, plenty of wolves.
01-basics/ One numbered folder per topic, in learning order
02-conditionals/ ...
03-loops/ ...next topics get the next number (04-..., ...)
notes/ Reference notes (data types, cheat sheets)
Inside each topic folder, the top-level .c files are lessons and worked
examples, and exercises/ holds the practice tasks solved by hand. Files
follow a simple convention: a two-digit number reflecting learning order,
followed by a short kebab-case description, e.g. 03-scanf-input.c.
Compiled binaries are never committed.
AI coding assistants help draft lesson examples and review solutions, but all exercise code is written by hand.
Each file is a standalone program. Compile any of them with:
clang -Wall -Wextra -fsanitize=address,undefined -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -o program 01-basics/01-hello-world.c
./programTo compile and run a single file in one step with those same flags, use the
run.sh wrapper. It builds the file to a temporary binary, runs it, and
removes the binary afterwards (any extra arguments are passed to the program):
./run.sh 01-basics/01-hello-world.cAll programs in this repository compile cleanly with -Wall -Wextra. To
verify that promise for every file at once, run the check script from the
repository root:
./check.shIt compiles each .c file (discarding the binaries) and fails if any file
produces an error or a warning.
- First compiled and running C program
- Basic data types and
printfformat specifiers - Reading user input with
scanf - Integer vs. float division and explicit casting
- First self-contained mini exam passed (howl average)
- Conditional statements (
if,else,switch)
- Loops (
while,for,do-while) - Functions: declarations, parameters, return values
- Arrays and strings
- Pointers and pointer arithmetic
- Structs and custom types
- Dynamic memory (
malloc,free) - File input and output
- A first multi-file project with a Makefile