|
|
The reference data type allows the program reference (= point) to any where in the computer memory and access data stored at that memory location !!!
|
|
Consequently:
|
|
A reference variable is often called a pointer variable
I will often use both terminology interchangeably !!!
dataType *varName ; |
Meaning:
|
Important note:
|
|
int *p ; // p can contain the address of an int typed variable float *q ; // q can contain the address of a float typed variable |
So p and q are reference variables.
Note:
|
|
(Persoanlly, I wish C had a cleaner way to define the reference typed variable...)