Module 07 of 11

Pointers & Memory Management

Lessons

About This Module

Pointers are the feature that sets C apart. Every variable lives at a memory address, and a pointer is simply a variable that holds one. Once that idea clicks, much of what makes C powerful, and sometimes tricky, starts to make sense.

The module starts with memory addresses and pointers: declaring them, reading the value they point to, and changing it. It then covers the link between pointers and arrays, including pointer arithmetic, and moves on to dynamic memory, where you request memory at runtime with malloc and give it back with free.

Take your time here and rewatch lessons if you need to. Then continue on to Structs, Unions & Enums.

Lessons

5 videos
01

Memory Addresses, Pointers & Dereferencing

The freeCodeCamp C course chapters on memory addresses, pointers, and dereferencing pointers. Starts at the 3:09:10 mark.

02

C Pointers

Programiz's lesson on pointer variables, accessing and changing values through a pointer, and the common mistakes to avoid.

03

Pointers, Arrays & Pointer Arithmetic

The relationship between pointers and arrays, and how pointer arithmetic lets you move through the elements of an array.

04

Pointers in C for Absolute Beginners

A full course on pointers for beginners, covering pointers as variables that store the memory address of another variable. A good companion if you want more practice.