1.

What will be the output of the program ? #include int main() { FILE *ptr; char i; ptr = fopen("myfile.c", "r"); while((i=fgetc(ptr))!=NULL) printf("%c", i); return 0; }

A. Print the contents of file "myfile.c"
B. Print the contents of file "myfile.c" upto NULL character
C. Infinite loop
D. Error in program
Answer» D. Error in program


Discussion

No Comment Found

Related MCQs