title: Why does fgets() store a \0 after the last character in a buffer?
body: <p>I've been doing abit of reading through the Linux programmer's manual looking up various functions and trying to get a deeper understanding of what they are/how they work.</p>
  
  <p>Looking at <code>fgets()</code> I read "A '\0' is stored after the last character in the buffer . </p>
  
  <p>I've read through <a href="https://stackoverflow.com/questions/14461695/what-does-0-stand-for">What does \0 stand for?</a> and have a pretty solid understanding of what <code>\0</code> symbolizes (a null character right ?). But what I'm struggling to grasp is its relevance to <code>fgets()</code>, I don't really understand why it "needs" to end with a null character.</p>