elibraryportal Logo

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,

SymbolNmeDescription
& (ampersand sign)Address of operatorGive the address of a variable
* (asterisk sign)Indirection operatorGives 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.

Example:-

Output

Address of number variable is fff4
Address of p variable is fff4
Value of p variable is 50
Next Topic