1.

Which of the following is the right declaration for fgets() inside the library?(a) int *fgets(char *line, int maxline, FILE *fp);(b) char *fgets(char *line, int maxline, FILE *fp);(c) char *fgets(char *line, FILE *fp);(d) int *fgets(char *line, FILE *fp);This question was posed to me during an interview.My question is taken from Line Input & Output in section Input and Output in C of C

Answer»

The correct choice is (b) char *FGETS(char *LINE, INT maxline, FILE *fp);

Explanation: None.



Discussion

No Comment Found

Related InterviewSolutions