adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
#include  <stdlib.h>
int main()
{
  int *p;
  p = (int *)malloc(40);
  printf("%d", sizeof(p));
  free(p);
  return 0;
}

a.

40

b.

50

c.

30

d.

20

Posted under C Programming

Answer: (c).30

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?