Caffeinated Coder
Book an appointment
Lesson 07 · Memory

Pointers

Every variable lives in memory at an address, and a pointer is a variable whose value is one of those addresses. Follow an eleven-line program as &x puts x's address into a pointer p, *p = 8 writes through p into x, p = &y makes it point somewhere else, and nullptr leaves it pointing nowhere, which you must never follow.

10 min9 steps5 questionsIntermediate
Fig 7 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.