title: why passing greater buffer size to fgets allowed by compiler
body: <p>I have the following code:</p>
  
  <pre><code>char str[0]; // 0 length
  
  while(fgets(str, 100, stdin)) { // It works.
     fputs(str, stdout);
  }
  </code></pre>
  
  <p>But if I do without loop, then it breaks. like this;</p>
  
  <pre><code>  fgets(str, 100, stdin); 
     fputs(str, stdout); 
  </code></pre>