What is the difference between fgets() and gets()?
I am trying break my loop when the user hits just \"enter\". It\'s working well with
The problematic difference between gets and fgets is that gets removes the trailing '\n' from an input line but fgets keeps it.
This means an 'empty' line returned by fgets will actually be the string "\n".
The nasty difference, that means it's best to avoid gets altogether, is that if you give gets a line that's too long your program will crash in very bad ways.