If you have any query feel free to chat us!
Happy Coding! Happy Learning!
In the C programming language, fgets()
is a function that is used to read a line of text from a file. It is defined in the stdio.h
header file and has the following prototype:
Copy code
char *fgets(char *str, int n, FILE *stream);
The function takes three arguments:
str
: a pointer to a buffer where the read line of text will be storedn
: the maximum number of characters to read, including the null characterstream
: a pointer to the FILE
object that corresponds to the file to be read
Comments: 0