/* * tourpoint1.c * Create a pointer */ #include int main(void) { int num; int * pnum; // declares a variable of type integer pointer with name pnum num = 8; pnum = # //assigns address of variable num to pointer variable pnum printf("The value of num is %d\n", num); printf ("Memory address of num, called &num, is %p\n", &num); printf("The value in variable pnum is %p\n", pnum); printf("Thus pnum contains the address of num, i.e. it points to num\n"); printf("Value at the memory location where pnum points"); printf("is accessed by *pnum and is %d\n", *pnum ); printf("Address of pointer pnum is %p\n", &pnum); printf("The pointer's address is different than the address it holds\n"); return 0; }