Pointers in C Language: quick revision, 15 bites
All 15 revision bites from this kit, free and with no sign-up.
A Pointer Holds an Address, Not a Value
Pointers store addresses, not data.
A pointer is a variable whose value is the **memory address** of another variable — it 'points to' where the data lives.
Takeaway. Think of a pointer as a label on a locker — it tells you where the data is, not what the data is.
Declaring and Initializing Pointers
Star declares, ampersand assigns.
Takeaway. The `*` in declaration means 'pointer to'; the `&` gives an address; `*p` dereferences.
Uninitialized Pointers Are Dangerous
Wild pointers crash programs silently.
Takeaway. A pointer without a target is a loaded gun — initialize to NULL or a valid address.
Pointer vs. Variable: What's the Difference?
Same memory, two different views.
Takeaway. A variable holds the value; a pointer holds where the value lives.
Pointers Let Functions Modify Caller's Data
Pass by pointer, change the original.
C passes arguments by value, so a function normally gets a copy. Passing a **pointer** lets the function modify the original variable.
Takeaway. To change a variable inside a function, pass its address — not its value.
Arrays and Pointers Are Closely Linked
An array name is almost a pointer.
Takeaway. Array indexing is just pointer arithmetic in disguise.
How Pointer Arithmetic Works
Add 1, jump by type size.
Takeaway. Pointer + n moves n elements forward, not n bytes.
Dangling Pointers: Pointing to Freed Memory
Freed memory is not safe memory.
Takeaway. Free, then null — always in that order.
Safe Pointer Habits
Small habits, fewer crashes.
Takeaway. Most pointer bugs come from missing initialization or missing cleanup.
Where Pointers Power Real Systems
Pointers run the systems you use.
Takeaway. Every dynamic data structure in C is a pointer structure underneath.
Exam Favorite: Output Prediction
Trace addresses, not just values.
Takeaway. In pointer output questions, track what each pointer points to at each line.
Remember the Two Symbols
Ampersand asks, star answers.
**`&`** = 'address of' (ask where it lives). **`*`** = 'value at' (go there and read).
Takeaway. & gives an address; * uses an address.
Interview Classic: Pointer vs. Reference
One can be NULL, one cannot.
Takeaway. In C, pointers are the only way to refer to another variable indirectly.
All Pointers Are the Same Size
Char pointer, int pointer — same bytes.
On a given system, every pointer type occupies the same number of bytes (e.g., 8 bytes on 64-bit). The type only tells the compiler **how to interpret** the pointed-to data and how far arithmetic moves.
Takeaway. Pointer size is fixed per architecture; the type controls interpretation, not size.
Pointers Enable Dynamic Memory
Size decided at runtime.
`malloc` returns a pointer to heap memory whose size is decided at **runtime** — impossible with fixed-size arrays.
Takeaway. Dynamic memory = pointers + malloc/free; always check for NULL and free when done.
Your notes can be a kit like these
Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Exam prep
Get Veda free See what students get
Free to start · No ads · Works in 42 languages