Step Into C · Lesson 9 · Memory
Pointers
Addresses, &, *, NULL, out-parameters and pointers to pointers.
- ~35 minreading and coding
- 4missions
- membersaccess
- Clanguage
Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.
Everything you do in systems programming (APIs, data structures, memory management, binary formats) runs on pointers. Take your time with this one.
In this lesson
- The most important lesson in C
- Every variable has an address
- A pointer is a variable that holds an address
- Dereferencing: following the pointer
- NULL
- Pass by pointer: letting a function modify your data
- Out-parameters
- const and pointers
- Pointers to pointers
- void *
Missions
- Write through a pointer
- Swap
- Out-parameters
- Pointer to pointer