Pointers and Memory in C
The topic that decides whether C makes sense to you or not
6 lessons · 1.1 hours of reading
· Intermediate · 3 free
Addresses, dereferencing, malloc and free, explained with the memory picture behind every line. Covers the crashes students actually hit: segmentation faults, leaks, dangling pointers and double free.
Lessons
1
What an address really is
Memory as a numbered street, and why a variable has both a value and a location.
2
Declaring and dereferencing pointers
How to write a pointer, read through it, write through it, and why NULL exists.
3
Pointers and arrays are not the same thing
Why arr and &arr[0] behave alike, where the illusion breaks, and what sizeof tells you.
4
Passing by pointer to change a caller variable
Simulating pass-by-reference in C, returning multiple values, and modifying pointers themselves.
5
malloc, free and what a memory leak costs
The heap, allocating memory at runtime, and the arithmetic of a leak in a long-running program.
6
Dangling pointers, double free and real crashes
The five memory bugs that actually crash student programs, and how to spot each one.
Lessons 4 to 6 need a Pro pass
A pass also opens every other course's paid lessons, all 50 mock test papers and the company-wise test series. It ends on its own date — nothing renews by itself and nothing is charged without you pressing a button.
See passes — from ₹29