Integer pointer only stores the address of an integer variable.
How to assign a variable address to the pointer?
This is also called referencing which means assigning the address of an existing variable to a pointer.
To reference a variable to the pointer, we should use & operator.
a is an integer variable which holds the value 10.
ptr is a pointer to a variable with type integer which holds the address of variable 'a'.
How to access the value stored at the pointer?
Using * (asterisk) operator, we can access the value stored at the pointer.
It is also called the dereference operator which will give the value stored at the pointer.
*ptr will give the value stored at the pointer.
*ptr => *(1024) => value at memory address 1024 is 10.
From the above diagram.