Learn C: Pointers and Memory
Understand how C programs use memory: addresses and pointers, dereferencing, pointer arithmetic and arrays, strings as character pointers, and managing heap memory with malloc, calloc, realloc and free, finishing with a string-copying project.
- Intermediate level
- 3 modules
- 13 lessons
- 62 tasks and questions
Syllabus
01PointersSee memory as numbered bytes, take the address of a variable, store it in a pointer, read and write through it, move through arrays with pointer arithmetic, and walk strings character by character.6 lessons
02Memory ManagementLearn where variables live, allocate memory at runtime with malloc and calloc, resize it with realloc, give it back with free, and recognize the classic memory bugs and the tools that catch them.5 lessons
03ProjectApply pointers, strings and heap allocation in a small string-copying library with safe, bounded copying.2 lessons