What is the output of this program?
#include
#include
int main()
{
int *p;
p = (int *)malloc(40);
printf("%d", sizeof(p));
free(p);
return 0;
}
Answer: C
Since p is the pointer variable of integer type, thus the size of integer type is 4.