Skip to content
FollowtheDamnCode

C from zero

Learn to program from zero with C — the language underneath almost everything. You'll see exactly how code, memory, and the machine fit together, which makes every language after it easier. The whole course is free.

1Getting Started

What a program is, and your first one running.

2Variables & Data

Storing values, printing them, and reading them from the user.

3Operators

Doing math and combining values.

4Making Decisions

Running different code depending on a condition.

5Loops

Repeating code without writing it again.

6Functions

Naming a piece of code so you can reuse it.

7Pointers

Variables that store where other variables live. Direct access to memory — with great power comes great responsibility.

8Arrays

Many values of the same type, in a row.

9Strings

Working with text.

10Structures

Grouping related values into your own type.

11Working with Files

Saving data so it's still there next time.

12Dynamic Memory

Asking for memory while the program runs — and the responsibility that comes with it: everything you take, you give back.

13Going Further

The tools real C programs lean on — read-only promises, functions as values, the preprocessor, many files, arguments, and the standard maths and clock.

14Writing Robust Code

Handling failure on purpose, and finding bugs when they happen anyway.

15Building Data Structures

Putting structs, pointers, and the heap together to build containers of your own.

16C Reference

Look-it-up pages: every keyword, the operator precedence table, printf/scanf format codes, and the most-used functions of the standard headers — each with its signature, a gotcha, and a tiny example.