Ask your own question, for FREE!
Computer Science 12 Online
OpenStudy (anonymous):

Point out the error in the following program.

OpenStudy (anonymous):

#include<stdio.h> #include<stdlib.h> int main() { int *a[3]; a = (int*) malloc(sizeof(int)*3); free(a); return 0; }

OpenStudy (anonymous):

We should store the address in a[i] Hence , Error: We cannot store address of allocated memory in a

OpenStudy (anonymous):

Thanks

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!