MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the following C code?#include <stdio.h> int main() { FILE *fp; char ch; int num = 0; fp = fopen("file1.txt", "r"); while (!feof(fp)) { ch = getc(fp); putc(ch, stdout); } } |
| A. | Prints to the screen content of file1.txt completely |
| B. | Prints to the screen some contents of newfile1.txt |
| C. | Compilation error |
| D. | Segmentation fault |
| E. | None of these |
| Answer» E. None of these | |