What will be the output of the following C code?
#include <stdio.h>
int main()
{
char *str = "hello, world\n";
printf("%d", strlen(str));
}
#include <stdio.h>
int main()
{
char *str = "hello, world\n";
printf("%d", strlen(str));
}A. Compilation error
B. Undefined behaviour
C. 13
D. 11
Answer: Option C

Join The Discussion