POINTER TO POINTER

#include<conio.h>
#include<stdio.h>
main()
{
int a=5;
int *p= &a;
printf("Simple pointer address = %d, and value =%d \n", p,*p );
int **q= &p;
printf("Pointer to Pointer address =%d, and value = %d \n",*q,*(*q) );
int ***r= &q;
printf("triple pointer address = %d, and value = %d" ,**r,*(*(*r)) );
}

OUTPUT



Simple pointer address = 2686744, and value =5
Pointer to Pointer address =2686744, and value = 5
triple pointer address = 2686744, and value = 5

No comments:

Post a Comment