Question: what fgets returns in c?
Answer: 1 Answer. fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s . Reading stops after an EOF or a newline. ... If a read error occurs, the error indicator for the stream shall be set, fgets() shall return a null pointer, and shall set errno to indicate the error.