Image

Programs - C Language - Pointer

Program:

#include<stdio.h>
#include<conio.h>
void main(){
int a=5,*p=&a,**q=&p;

printf("Address of a = %u\n",&a);
printf("Value of p = Address of a = %u\n",p);
printf("Value of p = Value of a = %d\n",*p);
printf("Address of p = %u\n",&p);
printf("Value of a = Address of p = %u\n",q);
printf("Value of *q = Value of p = %u\n",*q);
printf("Value of **p = Value of a = %d\n",**q);
printf("Address of q = %u\n",&q);

 getch();
 clrscr();
}