C Pointer to Pointer


A pointer to a pointer is a form of multiple indirection, or a chain of pointers. Normally, a pointer contains the address of a variable.

Syntax

int **var;

Example

#include <stdio.h>

int main()
{
int num = 20 ;
int  *ptr ;
int  **ptr2ptr;

ptr     = &num;
ptr2ptr = &ptr;

printf("%d",**ptr2ptr);

return(0);
}
Output
20

Share this article on