Pointers to Pointer Architecture with examples

Pointer to pointer:  It is a concept of holding an address of the pointer variable into another variable.

  • Pointer to pointer relations can be applied up to 12 stages but generally, there is no limitation.
  • When we are increasing the pointer to pointer relations, then performance will be decreased.

*  -represent variable address&- represents base address.

Syntax:

Pointer: Datatype

*ptr; p2p: Datatype

** ppt; P2p2p: Datatype *** ppptr;  

{

inti;

int * ptr;

int ** pptr;

int ***pptr;

ptr=&ptr;

pptr=&pptr;

i=10;

}

  • &i 2 500
  • ptr 2 500
  • i 2 10
  • ptr 210
  • &ptr 2 600
  • pptr 2 600
  • pptr 2500
  • **pptr 2 10

600 2 500210    

  • &pptr 2 700
  • ppptr 2 700
  • *ppptr 2600
  • ** ppptr 2 500
  • *** ppptr2 10

  *(700)

  ↓

  *(600)

  ↓

  *(500)

  ↓

   10  

For an in-depth understanding of Pointers click on