title: fgets reading more char than it should
body: <p>I'm developing a code where the user will type several paragraphs and it will stop reading when the user begin a paragraph with "END". The code will manipulate the string by counting each letter and showing a graph and blah blah blah, but this is irrelevant to the question.
  The thing is: which paragraph must have no more than 1000 characters. </p>
  
  <p>A smaller version of the code is the following (considering I just want to storage 5-char-string - even though I'll expand that).</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main()
  {
    char paragraph[5];
  
    for ( ; ; )
    {
      fgets(paragraph, 5, stdin);
  
      if (paragraph[0]=='E' &amp;&amp; paragraph[1]=='N' &amp;&amp; paragraph[2]=='D')
      { return 0; }
  
      printf("%s", paragraph);
    }
  
    return 0;
  </code></pre>
  
  <p>My problem is: if I type more than 5 characters, the printf function still prints more than 5 characters, I don't know why. I've already checked everything I could possible check.</p>
  
  <p>Help a beginner like me, please.</p>