← C Programming learning pathC Programming · Module 7 of 10
Pointers
A pointer stores a memory address; it is the most powerful idea in C.
📖 Key ideas
- Every variable lives at a memory address; &x gives that address.
- int *p = &x; makes p point to x.
- *p reads or changes the value p points to (dereferencing).
- Pointers let functions change caller variables and work with arrays.
- NULL means "points to nothing"; check before using.
💡 Real-life example: A pointer is a house address written on paper: with it you can visit and change what is inside the house.
&xAddress of x
*pValue at the address in p
NULLPointer to nothing
DereferenceAccess the value a pointer points to