#include<stdio.h>
#include<conio.h>
int main()
{
int a=10;
int *p;
int **pp;
p=&a; // pointer is pointing to the address of a
pp=&p; // pointer pp is a double pointer pointing to the adress of pointing p
printf("address of a: %x\n"); // adress of a will be printed
printf("address of p: %x\n",pp); // adress of p will be printed
printf("value stored at p: %d\n",*p);
printf("value stord at pp: %d\n",**pp);
getch();
}
Output:
address of a: e100ad18
address of p: e100ac08
value stored at p: 10
value stord at pp: 10
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer