Pointer to a Pointer

Pointer to a Pointer:
So far we have understood that a pointer is also a special variable, which is having a special role to play. One question that might strike in your head that if a pointer is a variable it must also have some memory allocation with a specific memory address (Hexadecimal address). Yes you are perfectly right. Pointers do have their own addresses just like a simple variable. Now a million dollar question arises that if pointers do have their own memory addresses, then their might be some variable which must be having ability to store memory address of a pointer. Yes there are special variables which are intended to store the memory addresses of other pointer variables. These special variables are called pointer to a pointer or more precisely Double Pointers. The whole scenario could be explained by following diagram:



Declaring Double Pointer variable: A double pointer variable can be declared in the same way as a normal pointer variable except that its declaration will involve two * (asterisks). For e.g.