1.

If malloc() successfully allocates memory it returns the number of bytes it has allocated. # include #include void fun(int *a) { a = (int*)malloc(sizeof(int)); } int main() { int *p; fun(p); *p = 6; printf("%dn",*p); return(0); }

A. May not work
B. Works and prints 6
C. Compiler Error
D. Runtime error
Answer» B. Works and prints 6


Discussion

No Comment Found