Q46
What will be the error (if any) in the following C code? #include #include #include int main() char *p; *p = (char)calloc(10); strcpy(p, "HELLO"); printf("%s", p); free(p); return 0;
A.
No error
B.
Error in the statement: strcpy(p,"HELLO");
C.
Error in the statement: *p=(char)calloc(10);
AnswerD.
Error in the statement: free(p);
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board