Let's start with something which is very interesting and a greatest asset of ours from C language, the Pointers.
1. Introduction
Whenever you see a definition of a variable, think it as if it is stored in the memory like this :-
***************************************************************************************************
1.1 What is '*' at all !?
- It is just another operator that gives the 'value at address'.
- *(&i) will give us the value of the address &i. (int i=3)
- If i define this address as j by j=&u. I must also define the variable j. But wait, it is not ordinary integer. But it is storing the address of integer i.
- Through int *j , the compiler knows that j will be used to store the address of an integer value.
A Program would explain this practically :-
https://github.com/manvendra88/C-Programming/blob/master/Basics_of_Pointers.cpp
1.2 Declaring the pointer
- float *s does not mean that s is going to contain a float value. s is a variable that contains address of float variable.
- Since a pointer is just another variable. It can also have a Pointer that points to its address.
Following program will explain it in greater detail.