Answer:
#include<stdio.h>
int main()//driver function
{
int a=5;//initializing variable a
int b=7;//initializing variable b
int *p,*q;//declaring pointers p and q
p=&a;//assigning the address of a to p
q=&b;//assigning the address of b to q
printf("value of a is %d\n",a);
printf("value of b is %d\n",b);
printf("value of pointer p is %d\n",*p);
printf("value of pointer q is %d\n",*q);
printf("address of a is %d\n",&a);
printf("address of b is %d\n",&b);
return 0;
}
Output
value of a is 5
value of b is 7
value of pointer p is 5
value of pointer q is 7
address of a is -783856608
address of b is -783856604