C for Beginners
C24 lessons4 hr 50 min
Learn C from a blank file to functions, pointers, and strings through short programs you compile and run yourself.
Modules
Lessons open in reading order. Each one is a public page.
Starting out
5 lessonsCompile and run a first program, read the parts of a C file, store values in typed variables, and steer execution with decisions and loops.
Arrays, functions and pointers
4 lessonsCollect values in arrays, move code into reusable functions, reach memory through pointers, and group text and fields in strings and structs.
Pointers and memory
6 lessonsWalk arrays with pointer arithmetic, add levels of indirection, allocate and release heap memory, and choose storage classes that match how long a value must live.
Working with text
3 lessonsUse string.h without its sharp edges, read lines safely with fgets, and build strings inside buffers whose capacity you track.
Records, files and recursion
6 lessonsModel records with nested structs, enums and unions, sort arrays of them, then work with text files, command-line arguments and recursive linked structures.
