
Prelab Activities
Review
Pointer Types
The pointer type is a simple data type that contains the address (or otherwise indicates
the location) of a variable of a given type.
#include <iostream>
using namespace std;
char* charPtr;
int *intPtr;
char letter = 'B';
int value = 1066;
charPtr
is a pointer that can point to a location in memory that can contain an
alphanumeric character. intPtr is a pointer that can point to a location in memory
that can contain an integer. Note that the asterisk (*) that indicates a pointer can go
either to the right of the type or to the left of the variable. If it is appended to the type
and more than one variable is being defined, ...