InterviewSolution
Saved Bookmarks
| 1. |
The syntax of fgets is char *fgets(char *line, int maxline, FILE *fp). Which is true for fgets?(a) Returns line on success(b) On end of file or error it returns NULL(c) Nothing(d) Both returns line on success & On end of file or error it returns NULLI had been asked this question in an internship interview.I'm obligated to ask this question of Line Input & Output in section Input and Output in C of C |
|
Answer» The correct answer is (d) Both RETURNS line on success & On END of FILE or error it returns NULL |
|