Pointer to another pointer

 //*P and **q denote a new one memory location....

#include <stdio.h>


int main()

{

    int i =10;

    int  *p,**q;

     p = & i;

     q = & p;

    

      

   

   printf ("real value of i is %d\n",i );

   printf("memory address of i is %u\n",&i);

    

   printf(" memory address of i stored in p is %u\n",p );

   printf("memory address of p is %u\n",&p);


   printf("memory address of p stored in q is %u\n", q);

    printf("memory address of k is %u\n",&q);

    

    printf("\n\n");

    

    printf("%d\n", *p);

   printf("%u\n", *q);

   printf("%u\n", **q);

    

  

    

    return 0;

}




Comments

Popular posts from this blog

Factors : using C

Cross shaped pattern

Factorial ! calculation