C Programming Course
The course
The course runs to 80 lessons in 13 parts, from a first
program to processes, sockets and threads, and closes with three capstone
projects. 80 lessons are written and listed below.
Every lesson is a practical manual: several complete programs, the exact
commands that build them, their real output, the diagnostics of the usual
mistakes, and exercises with no answers. The code is compiled with
GCC 15.2, whose default dialect is C23.
Start with lesson 1, What C is and how a program becomes a binary. For a short introduction to the language read C basics, and for the toolchain alone see GCC setup and troubleshooting.
Lessons
The written lessons, grouped by part. Click a part of the course to open or close its lessons.
How to work through it
Type every program yourself instead of copying it, then compile it with warnings on. The lessons assume you run the commands in the directory that holds the source file:
gcc -Wall -Wextra hello.c -o hello
./hello
-Wall -Wextra turns on the warnings that catch most beginner mistakes before the program runs. When a lesson needs another standard, another library or another flag, its commands show it. Lessons 19 to 21 move from one file to make and CMake projects, and lesson 61 adds the debugger.