adplus-dvertising
frame-decoration

Question

Which statment is true about the given code ?
#include <stdio.h>
#include  <stdlib.h>
int main()
{
    int *a[5];
    a = (int*) malloc(sizeof(int)*5);
    free(a);
    return 0;
}

a.

Error: unable to allocate memory

b.

Error: We cannot store address of allocated memory in a

c.

Error: unable to free memory

d.

No error

Answer: (b).Error: We cannot store address of allocated memory in a

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which statment is true about the given code ?