char *fgets(char *s, int size, FILE *stream);
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 newline is read, it is stored into the buffer.
A '\0' is stored after the last character in the buffer.
fgets() return s on success, and NULL on error or when end
of file occurs while no characters have been read.
阅读(1521) | 评论(0) | 转发(0) |