Pointers and Memory
Learn about pointers and memory in C.
StartKey Concepts
Review core concepts you need to learn to master this subject
What is a pointer?
Declaring Pointers
Accessing Memory Address
Dereferencing Pointers
Incrementing and Decrementing Pointers
Accessing Arrays
What is a pointer?
What is a pointer?
A pointer is a variable that stores the hexadecimal address of the variable it is pointing to.
Pointers: Lesson
Lesson 1 of 1
- 1For a program to execute, it must use some of the computer’s resources such as CPU, RAM, IO, or other hardware. Deciding how and at what capacity to use these resources is the job of the underlying…
- 3Since pointers are used to store the memory address of a variable, we need to obtain this address first. This is done by using the reference operator (&). The syntax for this is: > &variableName…
- 4If we have a pointer that is assigned the memory address of a variable, eventually we will need to access the data that it contains so we can use or manipulate it. The data contained in the memory …
- 5Remember that a pointer is a special type of integer variable. This implies that basic arithmetic operations can be done on pointers. In this exercise, we will explore this idea. The only arithmet…
- 6In the lesson on arrays, you learned that an array is a contiguous block of memory reserved for many variables of the same type. Because of this structured organization, a pointer is well suited to…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory