Build your understanding.
One idea at a time.
Begin with the first unit. Open a section to see its chapters, then read at your own pace. Every chapter is available whenever you need it.
00Before C
Build a model of programs, computers, languages, and execution.
6 chapters
Before C
Build a model of programs, computers, languages, and execution.
01C foundations
Connect names, values, expressions, choices, and calls.
9 chapters
C foundations
Connect names, values, expressions, choices, and calls.
Variables, values, and types
Data types, ranges, and representations
Declarations, initialization, and assignment
Reading C: tokens, expressions, and statements
Expressions and operators: meaning before precedence
Conditions, choices, and loops
Functions: inputs, results, and contracts
Recursion: following separate calls
Comments: explaining intent in C
02Language details
Separate access rules, object lifetimes, constant expressions, and version-aware keyword roles.
5 chapters
Language details
Separate access rules, object lifetimes, constant expressions, and version-aware keyword roles.
03Memory & data
Connect objects and lifetimes to pointers, arrays, strings, and allocation.
9 chapters
Memory & data
Connect objects and lifetimes to pointers, arrays, strings, and allocation.
04Designing data
Design records, alternatives, initialized values, layouts, and reliable data interfaces.
9 chapters
Designing data
Design records, alternatives, initialized values, layouts, and reliable data interfaces.
05Building programs
Prepare source, share interfaces, link components, and build reliable program boundaries.
10 chapters
Building programs
Prepare source, share interfaces, link components, and build reliable program boundaries.
Preprocessing: preparing the source
Macros: tokens, arguments, and pitfalls
Headers: sharing an interface
Translation units and linkage
Linking and libraries
The standard library: facilities and contracts
Modular programs: contracts and builds
Arguments, conversion, and the environment
Variadic functions: arguments need an agreement
Searching and sorting by a comparison rule
06Working with input
Read complete records, validate text, manage files, and handle failure without losing track of resources.
9 chapters
Working with input
Read complete records, validate text, manage files, and handle failure without losing track of resources.
Streams, buffering, and EOF
Formatted output and format contracts
Formatted input: matching and limits
Lines, boundaries, and checked parsing
Opening files, modes, and lifetimes
Block I/O, positions, and update streams
Errors, status, errno, and assertions
Ownership, cleanup, and partial work
Dates, clocks, and measuring time
07Correctness & care
Reason about numeric accuracy, portable formats, trust boundaries, shared state, and evidence from tools.
10 chapters
Correctness & care
Reason about numeric accuracy, portable formats, trust boundaries, shared state, and evidence from tools.
Behavior, guarantees, and undefined behavior
Evaluation order and side effects
Effective types, aliases, and access
Portability and explicit assumptions
Floating-point calculations and mathematical functions
Defensive C and security boundaries
External data formats: an agreement about bytes
Threads, atomics, and shared state
Diagnostics, debugging, and evidence
Style, contracts, and code review
08C in context
Connect history, design, language relationships, modern C, and whole-program reasoning.
6 chapters
C in context
Connect history, design, language relationships, modern C, and whole-program reasoning.