In case of a pointer to pointer concept, one pointer refers to the address of another pointer. The pointer to pointer is a chain of pointers. Generally, the pointer contains the address of a variable. The pointer to pointer contains the address of a first pointer. Let’s understand this concept through an example:
Pointer to pointer is a type of multiple indirection or pointer chain. A pointer typically contains the address of a variable. When we define a pointer to a pointer, the first pointer carries the address of the second pointer, which points to the real value, as seen below.
The pointer to a pointer in C is used when we want to store the address of another pointer. The first pointer is used to store the address of the variable. And the second pointer is used to store the address of the first pointer. That is why they are also known as double-pointers.
