

MCQOPTIONS
Saved Bookmarks
1. |
Point out the correct statements about the program?_x000D_ #include_x000D_ _x000D_ int main()_x000D_ {_x000D_ FILE *fptr;_x000D_ char str[80];_x000D_ fptr = fopen("f1.dat", "w");_x000D_ if(fptr == NULL)_x000D_ printf("Cannot open file");_x000D_ else_x000D_ {_x000D_ while(strlen(gets(str))>0)_x000D_ {_x000D_ fputs(str, fptr);_x000D_ fputs("\n", fptr);_x000D_ }_x000D_ fclose(fptr);_x000D_ }_x000D_ return 0;_x000D_ } |
A. | The code copies the content of one file to another |
B. | The code writes strings that are read from the keyboard into a file. |
C. | The code reads a file |
D. | None of above |
Answer» C. The code reads a file | |