1.

The______function reads atmost one less than the number of characters specified by size from the given stream and it is stored in the string str.(a) fget()(b) fgets()(c) fput()(d) fputs()This question was posed to me during an interview for a job.Query is from File Operations in division Input and Output in C of C

Answer»

Right option is (b) fgets()

The best explanation: The fgets() function READS one less than the number of characters indicated by the size from the given stream and it is stored in the string str. The fgets() terminates as SOON as it ENCOUNTERS either a NEWLINE character, EOF, or other error.



Discussion

No Comment Found

Related InterviewSolutions