1. Variable tracing
Step through a short C program line by line and watch each variable's value change. Tracing by hand is the single most useful debugging habit — the highlighted line is the one about to run, the table shows the state after it executes.
Each program is pure integer arithmetic, no I/O.
2. Expressions & operator precedence
Type an arithmetic expression in the C grammar (+ - * / % ( )). It is parsed into a tree showing the order of evaluation, and evaluated under two type regimes — int (truncating / and %) versus double.
3. Loops — the iteration table
A counted loop with its three parts: init ; condition ; update. Each row of the trace is one pass of the loop body; the bar chart shows the accumulator growing. Change the bounds and watch how many times the body actually runs.
4. Recursion & the call stack
A recursive function calls itself on a smaller input until it hits a base case, then the results unwind back up the stack. Watch the call tree expand and the stack grow and shrink. fib shows why naive recursion is expensive (repeated subproblems).
Tree nodes are calls; leaves are base cases.
5. Pointers & memory
Memory is a row of numbered cells. A pointer is just a variable that holds an address. &x takes an address, *p follows one. Move the pointer and step it with pointer arithmetic — p + 1 advances by one element, not one byte.
int is 4 bytes; addresses shown in hex.
6. Linear vs binary search
Search a sorted array for a target. Linear search checks every cell from the left; binary search halves the range each step but needs sorted data. Watch the probes light up and compare the step counts — the gap is $O(n)$ vs $O(\log n)$.
7. Sorting algorithms
Bars are array values. Press play to animate a quadratic sort: bubble, selection or insertion. The two highlighted bars are the pair being compared; counters track comparisons and swaps so you can feel the cost.
8. Linked lists
A singly linked list: each node stores a value and a pointer to the next node. Insert at the head or tail, delete by value, and watch the next pointers re-wire. Unlike arrays, insertion is $O(1)$ but there is no random access.
head → … → NULL. Pointers drawn as arrows.
9. Bit manipulation
An integer as raw bits. Read it in binary / octal / hex, toggle two's-complement signed mode, and apply a bitwise operator against a mask to see & | ^ << in action. Click any bit to flip it.
10. Backtracking — the N-Queens search
Place $N$ queens so none attack each other. The solver places one queen per column, backtracking whenever a column has no safe row. Step through to see the systematic try / fail / undo rhythm that defines backtracking.
11. Structs & memory layout
A struct groups fields in memory. The compiler aligns each field to its size, inserting hidden padding bytes. Reorder the fields to see how layout and total sizeof change — biggest-first is usually most compact.
char 1 · short 2 · int 4 · double 8 bytes.