What will be the output of the following C code?
#include <stdio.h>
int main()
{
char *str = "hello world";
char strary[] = "hello world";
printf("%d %d\n", strlen(str), strlen(strary));
return 0;
}
#include <stdio.h>
int main()
{
char *str = "hello world";
char strary[] = "hello world";
printf("%d %d\n", strlen(str), strlen(strary));
return 0;
}
A. 11 11
B. 12 11
C. 11 12
D. x 11 where x can be any positive integer.
Answer: Option A
Join The Discussion