What is Pointer in C
A Pointer is a variable which contains the address of another variable that is direct address of the memory location. and every memory location has address defined which can be accessed using ampersand (&) operator,
|& (ampersand sign)||Address of operator||Give the address of a variable|
|* (asterisk sign)||Indirection operator||Gives the contents of an object pointed to by a pointer.|
Advantage of Pointer
- Pointer reduces the code and improves the performance, because it direct access the address of variable.
- By use the pointer concept we can return multiple value from any function.
- By use pointer we can access any memory location from pointer.
Address of number variable is fff4
Address of p variable is fff4
Value of p variable is 50