title: Trying to Understand fgets()
body: <p>I'm writing a program to read a file line by line. I know fgets() will read up until a new line, n-1 characters, or EOF. What confuses me is how does fgets() know to advance to a new line/where it is in a file?</p>
  
  <p>To be clearer, I know in Java you have to explicitly tell the scanner to read the next line. But in C, I just put fgets() in a while loop and trust that is does it's job.</p>
  
  <p>How can I logically reassure myself that fgets() is actually advancing to the next line, and not reading the same line over and over again in that while loop (yes, I know I can print things out)?</p>