Page t037, go to NEXT,
PREVIOUS, INDEX
The (dreaded) Pointers
A pointer is an object that refers to another object
Declare it thus
int* p;
int *q;
- either form can be used
- both mean the same thing
Assign a value to the pointer
int *p;
int i = 3;
p = &i;
- read & as "address of"
- thus we have
C Course, 21-jan-1997,
Peter Klok,
pfk@hef.kun.nl