title: Why is scanf stuck inside a while loop?
body: <p>I used a scanf() inside a while loop.</p>
  
  <pre><code>while(1)
  {
      int input = 0;
      scanf("%d\n", &amp;input);
      printf("%d\n", input);
  }
  </code></pre>
  
  <p>When I run this program, and I enter a number, the <code>printf()</code> is not displaying that number unless I enter another number again.  Why?</p>