C Operations on Pointers
Operations on Pointers
Address of Operator (&):
- It is a unary operator.
- Operand must be the name of an already defined variable.
- & operator gives the address number of the variable.
- & is also known as the “Referencing Operator”.
Here’s one example to demonstrate the use of the address of the operator.
Output
Indirection Operator (*) :
- * is indirection operator.
- It is also known as the “Dereferencing Operator”.
- It is also a unary operator.
- It takes an address as an argument.
- * returns the content/container whose address is its argument.
Here’s one example to demonstrate the use of the indirection operator.
Output