Memory Visualizer
Press the buttons to run C++ lines and watch the stack, the heap and the pointer arrow change.
Stack
int x0x7ffe10
10
int* p0x7ffe18
nullptr
p → nothing
Heap
Empty — use new to allocate.
Code run so far
int x = 10; int* p = nullptr;