Which method can be used to read one line at a time from a file in C?
I am using the fgets function, but it\'s not working. It\'s reading the space
This is more of a comment than a complete answer, but I don't have enough points to comment. :)
Here's the function prototype for fgets():
char *fgets(char *restrict s, int n, FILE *restrict stream);
It will read n-1 bytes or up to a newline or eof. For more info see here