C you can read.
You get a short C program and predict what it does. Then the app walks through it line by line: which objects change, what gets printed, and why.
Try a card
Two names, one object.
A card from Stage 12, Pointer Fundamentals. Tap Step and watch what each line does.
Follow the highlighted line. The boxes are the program’s objects.
Output
Objects
Read the card: Two names, one object
Here is the thing pointers are actually for. Once p holds a's address, a and *p are two names for the same object - not two objects that agree, one object with two ways in. Write through either and read through either; the value is the same because the storage is the same. Every copy this course has made was a separate object. The one exception, Unit 9's array parameter reaching the caller's elements, used an address you never saw; now you hold it and name it.
One box, two ways in. The pointer never moved.
Your turn
Correct!
+5 XP
The card and the question are the ones in the app, word for word.
Inside the app
What the C course looks like.
Screens from the C course, on an iPhone.
-
Wrong answers explain why -
Why swap(a, b) can’t work -
What free actually does -
See where you are
The course
39 stages, in this order.
From your first program to pointers, memory and files, then how C lays out your data underneath.
- C Programs and the Toolchain
- Variables, Declarations and Values
- Integer, Floating and Character Types
- Basic Output and the Format Contract
- Operators and Expressions
- Making Decisions
- Loops
- Functions, Scope and Lifetime
- Arrays
- C Strings
- Structures
- Pointer Fundamentals
- Dynamic Storage and Ownership
- Beginner Project
- Checked Input and Text Conversion
- Numeric C and Conversions
- Expression and Control Extensions
- Arrays II
- Pointers II
- Strings and Raw Memory
- Dynamic Storage II
- Structures II and Recursive Data
- Typedefs, Enums and Qualified Types
- Function Pointers and Callbacks
- Headers, Preprocessor and Multi-file Programs
- File I/O and Command-line Programs
- Unsigned Bit Operations
- Intermediate Project
- Object Representation and Portability
- Alignment, Padding and Layout
- Unions and Compound Literals
- Advanced Declarators and Qualification
- Aliasing and restrict
- Advanced Preprocessor
- C inline, Linkage and Program Boundaries
- Representation-sensitive Bits
- Robust Resource Management
- Portable Binary Formats
- Advanced Project