Q208
What will be the output of the following C code? #include #include int main() char *str = "hello, world"; char str1[9]; strncpy(str1, str, 9); printf("%s %d", str1, strlen(str1));
A.
hello, world 11
B.
hello, wor 9
C.
Undefined behaviour
AnswerD.
Compilation error
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board