Pointer to a pointer in C is used to store the address of another pointer. A pointer to a pointer, also known as a double pointer, allows the value of normal pointers to be changed or variable-sized 2D arrays to be created. Double pointers occupy the same amount of memory as regular pointers. They are declared with an additional asterisk before the pointer variable name and initialized by storing the address of a normal pointer variable. Pointer to pointers have various applications including dynamic memory allocation of multidimensional arrays and storing multilevel data.
Related topics: