Page 1
Wink Notes
B.Tech CSE — 1st Semester
Programming for Problem Solving in C
— Unit - 4 —
1. What is a Pointer?
When you declare `int x = 5;`, the computer finds a random empty locker in RAM (say, locker number 2048), puts the number 5 inside it, and labels the locker 'x'.
A Pointer is just a variable that holds a LOCKER NUMBER (a memory address) instead of normal data.
Normal Variable
`int x = 5;`
Stores data (5).
Pointer Variable
`int *p = &x;`
Stores an address (2048).