1.

What will be the output of the program ?_x000D_ #include_x000D_ _x000D_ int main()_x000D_ {_x000D_ FILE *fp;_x000D_ unsigned char ch;_x000D_ /* file 'abc.c' contains "This is IndiaBIX " */_x000D_ fp=fopen("abc.c", "r");_x000D_ if(fp == NULL)_x000D_ {_x000D_ printf("Unable to open file");_x000D_ exit(1);_x000D_ }_x000D_ while((ch=getc(fp)) != EOF)_x000D_ printf("%c", ch);_x000D_ _x000D_ fclose(fp);_x000D_ printf("\n", ch);_x000D_ return 0;_x000D_ }

A. This is IndiaBIX
B. This is
C. Infinite loop
D. Error
Answer» D. Error


Discussion

No Comment Found

Related MCQs