|Screen-shot for pointer basic example C program|
What is pointer
Concept of pointer
Now look at the following declaration:
Here, n, ch and area are declared as pointer variable, i.e. these variable capable of holding addresses.
Keep in mind: Address ( location numbers ) are always whole numbers.
In summarize "we can say pointers are variable that contain addresses and addresses are always whole numbers."
The declaration float *area does not mean that area is going to contain a floating-point value. The meaning is, *area is going to contain the address of a floating-point value.
Similarly, char *ch means that ch is going to contain the address of a char value or in other words, the value at address stored in ch is going to be a char.
Now we know that "Pointer is a variable that contains address of another variable."
Can we further extended it? The answer is Yes, we can. Read in next chapter "Pointer Extended Example".