Foundations — Dynamic memory — malloc, calloc, realloc, free
Before you can read a single line like int *a = malloc(n * sizeof(*a));, you must own every piece of it. Let's build them one at a time, each on top of the last. Nothing here is assumed — if the parent used it, we define it here.
1. A byte — the atom of memory
The picture: imagine a street of identical mailboxes standing in a line. Each mailbox is a byte. Each can hold a small value.

Why the topic needs it: every function in the parent — malloc, calloc, realloc — deals in bytes. When you say malloc(20), you are saying "give me 20 of these boxes in a row." You cannot understand "how many bytes do I need?" until you know what a byte is.
2. An address — the house number of a byte
The picture: the number written under each mailbox in the figure above. The mailbox is the byte; the number beneath it is the address.
Why the topic needs it: malloc returns an address — the address of the first byte of your new block. That returned number is the only thing connecting you to your memory.
3. A pointer — a variable that stores an address
The picture: an arrow. The pointer sits in its own box; instead of a plain number it holds an arrow reaching over to the box it names.

In C we write a pointer's type with a star:
Why the topic needs it: malloc returns an address; you must store it somewhere to keep it. That somewhere is a pointer. Deeper detail lives in Pointers in C.
4. A type and its size — how wide is one thing?
The picture: an int is not one mailbox, it's a group of adjacent mailboxes (commonly 4) clamped together to hold one bigger number. A char is usually just 1 box.

Why the topic writes sizeof(*p): *p means "the thing p points at," so sizeof(*p) is "the size of one element." If you change p's type later, this line still asks the right question automatically.
5. An array — a row of same-type boxes, and how it relates to pointers
The picture: the mailbox street again, but now grouped into five equal int-wide cells labelled index 0 to 4.
Why the topic needs it: the whole point of dynamic memory is to make an array whose length you didn't know until runtime. You get an address from malloc, store it in a pointer, and use a[i] on it exactly like a real array.
6. The stack vs the heap — two neighbourhoods of memory
The picture: two separate regions of the memory street. Stack boxes get cleaned up for you when you leave a room; heap boxes stay rented until you hand back the key.

7. NULL — the address that points at nothing
The picture: a pointer arrow drawn pointing off the edge into empty space — deliberately aimed nowhere.
8. void * and casting — a generic, typeless address
The picture: the same arrow as before, but with no label saying what kind of box it lands on — a blank tag.
9. Memory leaks — rented boxes never returned
The picture: an arrow (your only pointer) getting overwritten, while the box it named floats away, still marked "in use," with no arrow left reaching it.
Why the topic needs it: this is the danger behind free, behind v = realloc(v, ...), and behind setting p = NULL. Tools to catch leaks live in Memory Leaks and Valgrind.
How these feed the topic
Equipment checklist
Self-test: cover the right side and answer.
What is a byte?
What is an address?
What is a pointer?
What do the two uses of * mean?
int *a it means "pointer"; in an expression *a it means "dereference — fetch the pointed-at value."What does sizeof(*p) compute?
p points at.Convert "n objects of type T" to bytes.
n * sizeof(*p).What is the difference between stack and heap memory?
free it yourself).What is NULL and when does malloc return it?
malloc returns it when it can't satisfy the request.What is a void * and why does malloc return one?
malloc deals in raw bytes and doesn't know your type.What is a memory leak?
free because you lost every pointer to it.