What is Pointer MME1322 Programming IIUM (PART 1)

Definition:

Dr Rashid A Saeed 
-a pointer is a variable that holds the address of a memory location

For example:

int *x ;
int y ;
x = &y ;  // x hold the address of  y
              // we can say x is pointing to y

explanation:based on my understanding that the integer x have been transeffered to the memory box [] of y,so the value in the memory of y is x


Address Operator

-A variable can be referenced using the address operator &

example:
  scanf("%f", &x);

-This statement specifies that the value read is to be stored at the address of x

int *iPtr;
double *dPtr;

the variable iPtr is declared to point to an integer
the variable dPtr is declared to point to a double

explanation:based on my understanding,like scanf,the pointer do have same concept with scanf
                   which the input will be filled to the memory[]