title: How to get integer input in an array using scanf in C?
body: <p>I am taking multiple integer inputs using scanf and saving it in an array</p>
  
  <pre><code>while(scanf("%d",&amp;array[i++])==1);
  </code></pre>
  
  <p>The input integers are separated by white spaces for example:</p>
  
  <pre><code>12 345 132 123
  </code></pre>
  
  <p>I read this solution in another post.</p>
  
  <p>But the problem is the while loop is not terminating.</p>
  
  <p>What's the problem with this statement?</p>