YOUR C LEARNING COMPANION

Find your next idea.

CHAPTER LIBRARY

Find your next idea.

From first principles to memory, program design, and modern C. Browse freely, or follow the learning path to connect the concepts.

73 chapters to explore

01

What is programming?

Turn an everyday problem into precise steps, and distinguish a program, an algorithm, and the result you want.

6 min·FoundationsExpanded
02

How computers follow instructions

Understand program state, sequence, decisions, repetition, and the difference between an instruction in a language and a machine instruction.

6 min·FoundationsExpanded
03

CPU, memory, storage, and the operating system

Build a practical model of the parts involved when an ordinary computer runs a program, without mistaking that model for C’s rules.

5 min·FoundationsExpanded
04

Why programming languages exist

Connect human-readable source, grammar, meaning, translation, and the abstractions that make a programming language useful.

5 min·FoundationsExpanded
05

Why C was created

Connect C’s origins to Unix, earlier languages, and the practical problem of writing systems software.

5 min·FoundationsExpanded
06

From source code to a running program

Separate editing, translation, linking, loading, and execution, and understand where a useful diagnostic can come from.

6 min·FoundationsExpanded
07

Variables, values, and types

Give meaning to data: understand the difference between an object, its name, its type, and its current value before moving into declaration, initialization, assignment, and conversion.

12 min·FoundationsExpanded
08

Data types, ranges, and representations

Choose types by meaning, range, and precision, and distinguish C guarantees from familiar machine sizes.

7 min·FoundationsExpanded
09

Declarations, initialization, and assignment

Separate introducing a name, defining an object, supplying its first value, and changing it later.

6 min·FoundationsExpanded
10

Reading C: tokens, expressions, and statements

Recognize the small language units inside a line of C, then connect them to declarations, expressions, and statements.

5 min·FoundationsExpanded
11

Expressions and operators: meaning before precedence

Reason about operands, types, comparisons, short-circuiting, side effects, and the difference between grouping and evaluation order.

12 min·FoundationsExpanded
12

Conditions, choices, and loops

Follow how execution selects a path, repeats work, and transfers control, with careful attention to boundaries and progress.

7 min·FoundationsExpanded
13

Functions: inputs, results, and contracts

Understand declarations, calls, parameters, return values, scope, and pass-by-value without assuming that a function prints its result.

11 min·FoundationsExpanded
14

Recursion: following separate calls

Understand stopping cases, progress, separate local state, returned results, and the limits of recursive designs.

5 min·DevelopingExpanded
15

Comments: explaining intent in C

Understand comment syntax, translation, limitations, and the difference between documenting a decision and changing program behavior.

5 min·FoundationsExpanded
16

Qualifiers: read-only access and observable effects

Understand const access paths, then revisit optional pointer, volatile, restrict, and atomic contracts.

8 min·FoundationsExpanded
17

Storage classes: duration, scope, and linkage

Ask separate questions about names, object lifetimes, definitions, initialization, and shared declarations.

8 min·FoundationsExpanded
18

Constants, constant expressions, and compile-time checks

Choose between literals, enumeration constants, macros, const objects, and C23 constexpr with the right contract.

7 min·FoundationsExpanded
19

Reading keywords by the job they do

Connect types, declarations, control flow, type queries, generic selection, and function specifiers.

7 min·FoundationsExpanded
20

C keyword index: C17 and C23

Browse every standard keyword spelling by edition, role, and a link to its deeper explanation.

7 min·FoundationsExpanded
21

Objects and memory

Distinguish an object, its value, its representation, and its physical implementation before reasoning about addresses.

6 min·FoundationsExpanded
22

Scope, lifetime, and storage duration

Separate where a name is visible from when an object exists, then connect those rules to safe pointer use.

9 min·FoundationsExpanded
23

Understanding pointers

Build a clear model of pointer objects, their targets, aliasing, null values, and indirect access through function parameters.

9 min·FoundationsExpanded
24

Understanding arrays

Connect element counts, contiguous storage, initialization, indexing, and permitted one-past boundaries.

10 min·FoundationsExpanded
25

Arrays and pointers together

Explain array-to-pointer conversion, adjusted parameters, pointer-to-array declarations, and two-dimensional rows.

5 min·FoundationsExpanded
26

Characters, buffers, and strings

Understand termination, capacity, length, literals, copies, and why text-handling functions need explicit contracts.

6 min·FoundationsExpanded
27

Text, Unicode, UTF-8, and locale

Separate storage units, code points, displayed characters, UTF-8 validation, and locale-dependent conversion.

5 min·DevelopingExpanded
28

Dynamic memory and ownership

Connect allocation, initialization, size checks, replacement, and release to a deliberate ownership contract.

7 min·FoundationsExpanded
29

Understanding memory mistakes

Diagnose invalid access through lifetime, bounds, type, initialization, and ownership instead of guessing whether code will crash.

6 min·FoundationsExpanded
30

Structures: related data

Give related values one record type, then distinguish contained members, pointer links, tags, and object identity.

5 min·Core conceptsExpanded
31

Structure values and functions

Understand record copying, pointer members, value parameters, returned results, semantic equality, and serialization limits.

5 min·Core conceptsExpanded
32

Enumerations: named choices

Name states clearly while separating enum types, numeric representations, accepted inputs, and C23 extensions.

5 min·Core conceptsExpanded
33

Unions and tagged data

Use shared storage for alternatives and maintain a clear contract connecting an explicit tag to the selected payload.

5 min·Core conceptsExpanded
34

Initializing records and aggregates

Connect braced and designated initialization to typed values, then understand compound literals, lifetimes, and C23 additions.

6 min·Core conceptsExpanded
35

Padding, alignment, and layout

Separate logical fields from their representation and query layout without guessing portable sizes or bit patterns.

5 min·Core conceptsExpanded
36

Flexible array members

Build a checked header-plus-payload model with explicit allocation size, logical length, copying, and ownership.

6 min·Core conceptsExpanded
37

Types, declarations, and data interfaces

Read aliases and qualifiers precisely, validate invariants, and introduce opaque interfaces with explicit lifetime contracts.

6 min·Core conceptsExpanded
38

Function pointers and callbacks

Pass a choice of behavior through a compatible function pointer, and state the call and lifetime contracts.

5 min·DevelopingExpanded
39

Preprocessing: preparing the source

Understand directives, configuration branches, and the difference between selecting source and choosing a runtime path.

5 min·IntermediateExpanded
40

Macros: tokens, arguments, and pitfalls

Follow replacement tokens, grouping, repeated evaluation, stringizing, token pasting, and C23 variadic distinctions.

7 min·IntermediateExpanded
41

Headers: sharing an interface

Read a self-contained header, understand include guards, and separate shared declarations from program definitions.

5 min·IntermediateExpanded
42

Translation units and linkage

Connect separate source contexts through compatible declarations, internal and external linkage, and consistent definitions.

5 min·IntermediateExpanded
43

Linking and libraries

Follow object files into an executable, build a small static archive, and distinguish language guarantees from toolchain conventions.

5 min·IntermediateExpanded
44

The standard library: facilities and contracts

Choose library families, read buffer and error contracts, and distinguish hosted, freestanding, C17, C23, and platform facilities.

6 min·IntermediateExpanded
45

Modular programs: contracts and builds

Design a small score module with a clear invariant, private validation, failure behavior, and correct rebuild dependencies.

5 min·IntermediateExpanded
46

Arguments, conversion, and the environment

Check argc and argv bounds, validate numeric text with strtol, and treat environment strings as borrowed external input.

6 min·IntermediateExpanded
47

Variadic functions: arguments need an agreement

Understand count and type contracts, default argument promotions, va_list traversal, cleanup, and safer interface choices.

5 min·DevelopingExpanded
48

Searching and sorting by a comparison rule

Connect qsort and bsearch to arrays, element sizes, callback contracts, ordering, and duplicate values.

5 min·DevelopingExpanded
49

Streams, buffering, and EOF

Understand stream state, standard streams, buffering, read results, and the difference between end-of-file and an error.

5 min·IntermediateExpanded
50

Formatted output and format contracts

Match output conversions to argument types, distinguish width from precision, and check bounded formatting and stream failures.

6 min·IntermediateExpanded
51

Formatted input: matching and limits

Read scanf destination contracts, assignment counts, field widths, whitespace behavior, and numeric conversion limits.

6 min·IntermediateExpanded
52

Lines, boundaries, and checked parsing

Separate input acquisition, complete-record boundaries, text conversion, and application validation.

7 min·IntermediateExpanded
53

Opening files, modes, and lifetimes

Choose read, write, append, update, and exclusive-creation modes while managing stream ownership and close failures.

6 min·IntermediateExpanded
54

Block I/O, positions, and update streams

Count complete transfer elements, handle partial records, follow update-stream transitions, and interpret file positions carefully.

7 min·IntermediateExpanded
55

Errors, status, errno, and assertions

Design clear failure outcomes, respect documented errno contracts, keep validation outside assert, and recognize nonlocal-jump limits.

6 min·IntermediateExpanded
56

Ownership, cleanup, and partial work

Follow a checked file copy through acquisition, short transfers, close failures, borrowing, and partial-output limits.

6 min·IntermediateExpanded
57

Dates, clocks, and measuring time

Separate calendar time, local display, processor time, elapsed duration, resolution, and C23 clock support.

5 min·DevelopingExpanded
58

Behavior, guarantees, and undefined behavior

Separate undefined, unspecified, and documented implementation choices, then justify the preconditions before an operation.

9 min·AdvancedExpanded
59

Evaluation order and side effects

Trace full expressions, short-circuit guards, comma operators, function calls, and unsequenced conflicts without guessing an output.

5 min·AdvancedExpanded
60

Effective types, aliases, and access

Connect permitted access types, representation copies, allocated storage, alignment, and restrict contracts.

6 min·AdvancedExpanded
61

Portability and explicit assumptions

State supported targets, check ranges, encode a defined octet format, and separate C17/C23 guarantees from platform conventions.

5 min·IntermediateExpanded
62

Floating-point calculations and mathematical functions

Understand precision, rounding, tolerance policies, math domains, special values, and the difference between C guarantees and observed formats.

6 min·DevelopingExpanded
63

Defensive C and security boundaries

Validate sizes and meanings, preserve buffer contracts, keep formats trusted, and understand what hardening can and cannot establish.

6 min·IntermediateExpanded
64

External data formats: an agreement about bytes

Design an explicit record format, validate its boundaries and version, and separate serialization from raw object storage.

6 min·DevelopingExpanded
65

Threads, atomics, and shared state

Reason about data races, atomic updates, mutex invariants, release/acquire publication, and thread lifetime.

7 min·AdvancedExpanded
66

Diagnostics, debugging, and evidence

Build a reproducible case, investigate with the right tools, understand detector limits, and turn repairs into contract-focused checks.

5 min·IntermediateExpanded
67

Style, contracts, and code review

Use names, invariants, scope, control flow, guidelines, and review to make program assumptions visible.

5 min·IntermediateExpanded
68

C’s timeline: history, editions, and standards

Trace C’s development and published revisions, and distinguish nicknames, dates, drafts, and compiler modes.

6 min·FoundationsExpanded
69

Why C looks this way: design and tradeoffs

Connect concise operations, low-level control, portability, efficiency, and explicit program contracts.

6 min·IntermediateExpanded
70

C’s influence: languages, runtimes, and interfaces

Separate shared history, familiar syntax, implementation language, and foreign interfaces.

6 min·IntermediateExpanded
71

Modern C: C23 features and adoption

Understand C23’s language and library changes, remaining contracts, and feature-by-feature implementation support.

9 min·IntermediateExpanded
72

Reading complete programs through their contracts

Connect validation, objects, arithmetic, state changes, and output through two worked C17 programs.

7 min·IntermediateExpanded
73

Carry the model forward: review and next steps

Connect the nine units, review your reasoning habits, and choose a useful next learning step.

5 min·FoundationsExpanded
Search all 73 chapters in both languages.EN + HG

Try “pointer”, “why int”, or “undefined behavior”.

Concepts connect. Follow your curiosity.↑ ↓ to explore · Enter to open
MAKE YOURSELF COMFORTABLE

Your reading space

Appearance

A clear canvas with balanced contrast.

Text size

100%
AA

Reading tools

Your data stays in this browser

Export a backup before changing browsers or replacing an older version of the reader.

YOUR PERSONAL MARGINS

My notebook

Saved on this device
A LITTLE CLARITY

The glossary

A starting meaning, then a chapter to go deeper.

A QUICK DEFINITION

A little clarity

Read the full explanation →

A thought worth keeping