1.

What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
int main()
{
char line[25];
FILE *fp;
fp = fopen("file.txt", "r");
while (fgets(line, 25, fp))
fputs(line, stdout);
return 0;
}

A. No.of lines present in file.txt
B. Infinite loop
C. Compilation error
D. Segmentation fault
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs