-
What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
int main()
{
char line[];
fgets(line, 25, stdin);
printf("%d\n", strlen(line));
return 0;
}
-
- 25
- Any length since line did not end with null character
- Compilation Error
- Runtime Error
- None of these
Correct Option: C
Compilation Error
main.c: In function ‘main’:
main.c:5:14: error: array size missing in ‘line’
char line[];