Professional Documents
Culture Documents
DECLARATION :
int *p;
here, the * sign represents that p is of pointer type. This pointer
is declared as int hence, it is of integer type and can contain
the memory address of any variable of integer type.
#include<stdio.h>
#include<conio.h>
void main()
{
int a, *p;
clrscr();
a = 10;
p = &a;
printf(“The value of a = %d”,a);
printf(“\nThe address of a is = %u”,&a);
printf(“\nThe address of a = %u”,p);
printf(“\nThe value of a is = %d”,*p);
getch();
}
P = &a;
a p
10 2568
2568 4298
Variable Name
Value
Address
#include<stdio.h>
#include<conio.h>
void main()
{
int a, *p, **q;
clrscr();
a = 10;
p = &a;
q = &p;
getch();
}