Vidyalelo
C Programming · Q49

Memory Allocation

Programming · C Programming · question 49

Q49

What will be the output of the following C code if it is executed on a 32 bit processor? #include #include int main() int *p; p = (int *)malloc(20); printf("%d ", sizeof(p)); free(p); return 0;

A.
2
B.
4
Answer
C.
8
D.
Junk value

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board