CMD Simulator

Simple Stack - int and Pointer

Declare an int and a pointer. See how the stack frame holds both, and the pointer stores the address of the int.

Try an example:
Your C code (must have main())
Controls

No memory to show yet

Click Run or Step to execute your code. The diagram will show where variables live: Stack (local vars), Heap (malloc blocks), and pointers between them.

Output (printf)

No output yet. Use printf("text") or printf("x = %d", x) to print.