C Programming :: Dynamic Memory Allocation - Discussion
Home > C Programming > Dynamic Memory Allocation > MCQs Questions Discussion
6 / 18
What is the output of the following 'C' program ?
#include
#include
int main()
{
int *p;
p = (int *)malloc(20);
printf("%d\n", sizeof(p));
free(p);
return 0;
}
#include
int main()
{
int *p;
p = (int *)malloc(20);
printf("%d\n", sizeof(p));
free(p);
return 0;
}
A4
B2
C8
DGarbage value
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!