What will be the output of the following code?#include <stdio.h>#include <string.h>int main() { char str1[10] = "abc"; char str2[] = "def"; strncat(str1, str2, 2); printf("%s", str1); return 0;}Question 12AnswerA.abcdefB.abcdeC.abD.Compilation error
Question
What will be the output of the following code?#include <stdio.h>#include <string.h>int main() { char str1[10] = "abc"; char str2[] = "def"; strncat(str1, str2, 2); printf("%s", str1); return 0;}Question 12AnswerA.abcdefB.abcdeC.abD.Compilation error
🧐 Not the exact question you are looking for?Go ask a question
Solution
B. abcde
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.