Question 562: In a file contains the line "I am a boy\r\n" then on reading this line into the arraystrusingfgets(). What willstrcontain?
tcs
wipro
infosys
general
aptitude
input-output
Declaration:char *fgets(char *s, int n, FILE *stream);fgetsreads characters from stream into the strings. It stops when it reads either n - 1 characters or a newline character, whichever comes first.Therefore, the stringstrcontain "I am a boy\n\0"