>It's obvious the fgets i gonna really until '\n' or EOF as per the specification of fgets.
It may be obvious, but it's wrong because fgets is constrained by the size of the buffer you give it. Let's say your buffer is large enough to hold 10 characters and a null character. What happens if the line contains 20 characters?
The specification of fgets says that the buffer will be filled as usual, but because there's no newline, no newline will be stored. This way you can use fgets with multiple calls to read lines that are longer than the size of the buffer simply by checking for the presence of a newline character. If there's a newline, you've found the end of the line. If there's not a newline, you've only read a partial line.