Home Segments Index Top Previous Next

304: Mainline

You define pointer variables just as you define other variables, except that an asterisk appears in the definition when you define a pointer variable:

int i;        /* Allocate space for an integer, i */ 
int *iptr;    /* Allocate space for a pointer to an integer, iptr */ 

Thereafter, iptr, without an asterisk, identifies the location of an address; *iptr, with an asterisk, identifies the location of the integer identified by the address.