What will be the output of the following C code?
#include <stdio.h>
int main()
{
char n[] = "hello\nworld!";
char s[13];
sscanf(n, "%s", s);
printf("%s\n", s);
return 0;
}
#include <stdio.h>
int main()
{
char n[] = "hello\nworld!";
char s[13];
sscanf(n, "%s", s);
printf("%s\n", s);
return 0;
}A. hellonworld!
B. hello
world!
C. hello
D. hello world!
Answer: Option C

Join The Discussion