-
What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
int main()
{
char *s = "hello, Interview, Mania";
char s1[25];
strncpy(s1, s, 25);
printf("%s %d", s1, strlen(s1));
}
-
- Segmentation fault
- Compilation Error
- Nothing
- hello, Interview, Mania 23
- None of these
Correct Option: D
hello, Interview, Mania 23