C Programming :: Dynamic Memory Allocation - Discussion
Home > C Programming > Dynamic Memory Allocation > MCQs Questions Discussion
5 / 18
What will be the output of the program?
#include
#include
int main()
{
int *p;
p = (int *)malloc(20); /* Assume p has address of 1314 */
free(p);
printf("%u", p);
return 0;
}
#include
int main()
{
int *p;
p = (int *)malloc(20); /* Assume p has address of 1314 */
free(p);
printf("%u", p);
return 0;
}
A1314
BGarbage value
C1316
DRandom address
Answer: Option (Login/Signup)
Show Explanation