COMP15 Spring 2018
Data Structures
Last updated January 09, 2018 15:07:56 EST

General Information Syllabus Schedule Homeworks and Projects
 Labs Resources  


Pointers in a nutshell

A pointer is a variable whose value is an address.

They often look like this 0x7fff3889b4b4 or 0x60132, or 0x602010 (some examples taken from a program I just ran). These addresses are expressed as numbers in hexadecimal, which is base 16 (that's what the 0x at the beginning means). You don't have to know what the numbers are, but you do need to know that:

Pointers in C++

C and C++ allow you to manipulate pointers explicitly.

The & operator, called the address of operator, can be applied to a variable to find out its address.

Pointers practice

Try out this worksheet to get some hands-on practice if you're new to pointers or need a refresh. If you don't know the answers to the questions in the worksheet, code them up!

Warnings/Common Bugs


Laney Strange
Last updated January 09, 2018 15:07:56 EST