1.

Point out the error of the following code #include #include #include int main() { char* ptr; *ptr = (int*)malloc(30); strcpy(ptr, "ABC"); printf("%s", ptr); free(ptr); }

A. Error in strcpy() statement
B. Error in *ptr = (int*)malloc(30);
C. Error in free(ptr)
D. No Error
Answer» C. Error in free(ptr)


Discussion

No Comment Found