

MCQOPTIONS
Saved Bookmarks
1. |
Which of the following statement is correct about the program?_x000D_ #include_x000D_ _x000D_ int main()_x000D_ {_x000D_ FILE *fp;_x000D_ char ch;_x000D_ int i=1;_x000D_ fp = fopen("myfile.c", "r");_x000D_ while((ch=getc(fp))!=EOF)_x000D_ {_x000D_ if(ch == '\n')_x000D_ i++;_x000D_ }_x000D_ fclose(fp);_x000D_ return 0;_x000D_ } |
A. | The code counts number of characters in the file |
B. | The code counts number of words in the file |
C. | The code counts number of blank lines in the file |
D. | The code counts number of lines in the file |
Answer» E. | |