What will be the output of the following C code? Assume that the required…
What will be the output of the following C code? Assume that the required headers are included and these statements are inside a valid function.
char str1[] = "Coding";
char str2[] = {'C', 'o', 'd', 'i', 'n', 'g', '\0'};
if (strcmp(str1, str2) == 0)
printf("Same");
else
printf("Not Same");- A.
Same
- B.
Not Same
- C.
Compilation error
- D.
Runtime error
Attempted by 126 students.
Sign up free to check your answer
Sign up freeLoading lesson…

