#include<stdio.h>
int main()
{
int a=2, *p;
p=&a;
float b=3.24 , *q;
q=&b;
double c=3.27, *r;
r=&c;
char d='x' , *s;
printf("\nSize of char =%d \t Size of char pointer=%u\n", sizeof(s) , sizeof(*s));
printf("Size of int =%d \t Size of int pointer=%u", sizeof(p) , sizeof(*p));
printf("\n Size of flot =%d\t Size of float pointer=%u", sizeof(q) , sizeof(*q));
printf("\n Size of double=%d\t Size of double pointer=%u\n", sizeof(r) , sizeof(*r));
return 0;
}
Output:-
Size of char =8 Size of char pointer=1
Size of int =8 Size of int pointer=4
Size of flot =8 Size of float pointer=4
Size of double=8 Size of double pointer=8

Comments
Post a Comment