03. Pointer Arithmetic Simulator

Visualize how memory addresses scale under C/C++ pointer arithmetic. Master the concept that adding 1 to a pointer shifts the address by the size of its data type.

Simulation Settings

8
Arithmetic Operation
Current Step
ptr + 3
ptr - 4 ptr + 0 (Base) ptr + 11
Resulting Address 0x100C
Decimal Representation 4108
Byte Shift (Movement) +12 Bytes
Scaling Factor 3 steps × 4 bytes

Step-by-Step Scaling Math

Formula: Result = BaseAddress + (Index * sizeof(type))
Base Address : 0x1000 (4096)
Type size : 4 bytes (int)
Step index : 3
Calculation: 0x1000 + (3 * 4) = 0x1000 + 12 = 0x100C

Visual Memory Map

Array Visualizer

Each block represents one element of the virtual array. Click any cell to point directly to that index!

Normal Array Element
Base Address (ptr + 0)
Active Result (ptr + N)