Getting Started
Environment setup & build
Basic
4 chapters · Hello World → operators
Chapter 1 — Hello, World!
C program anatomy · compile · run
The first C chapter. Through the simplest possible program you experience one full cycle: **C program anatomy → compile → run**.
Chapter 2 — Variables & Data Types
variables · int/float/char · sizeof · const
Programs need to **hold values in memory**. This chapter covers how C represents numbers, characters, and constants — and how big each takes.
Chapter 3 — Standard I/O
printf format · scanf · safe input
How C reads from the keyboard and writes to the screen. `printf` formats output; `scanf` parses input.
Chapter 4 — Operators
arithmetic · comparison · logical · cast
Arithmetic, comparison, logical, and bitwise operators — the verbs of C. Precedence rules matter more than you think.
Intermediate
4 chapters · conditionals, loops, arrays, strings
Chapter 1 — Conditionals
if · else · switch · ternary
`if / else if / else`, the ternary, and `switch` — the four ways C branches.
Chapter 2 — Loops
for · while · do-while · break/continue
`for`, `while`, `do-while` — three ways to repeat. `break` and `continue` short-circuit a loop.
Chapter 3 — Arrays
1D · 2D · indexing
A contiguous block of same-typed values. Indexed from 0. The foundation of strings, matrices, and most data structures.
Chapter 4 — Strings
char[] · <string.h> · fgets
In C a string is **a char array ending with `\0`**. The `\0` is what makes a "string" different from a "char array".
Advanced
3 chapters · pointers, functions, structs
Chapter 1 — Pointers
& · * · pointer arithmetic
A pointer is a variable that **stores the address** of another variable. This is what makes C "low-level" — and what makes most C bugs.
Chapter 2 — Functions
definition · call · recursion · static
Splitting a program into named, reusable pieces. Parameters, return values, recursion, and `static`.
Chapter 3 — Structs
struct · typedef · pointer · array
`struct` groups related fields under one name. With `typedef` you get a clean alias. The building block of every C data model.
Deep
2 chapters · file I/O, dynamic memory
Chapter 1 — File I/O
fopen · fread/fwrite · text/binary
Persist data between runs. `fopen` / `fclose`, text mode vs binary mode, and the `f*` family of functions.
Chapter 2 — Dynamic Memory
malloc · free · calloc · realloc
`malloc`, `calloc`, `realloc`, `free` — runtime allocation on the **heap**. The boundary between intermediate and "C programmer".