title: Is there any way in C to terminate scanf() inputting in array without ctrl+d?
body: <p>For example :I want to terminate inputting without using (ctrl+d or pressing any character) as doing this cause the program to execute and the second scanf() does not work.I am not allowed to input number of elements in the array.</p>
  
  <pre><code>for(i=0;a[i]&lt;10000;i++)
   {
      if(scanf("%d",&amp;a[i])==1)
      count++;
   }
  for(j=0;a[j]&lt;10000;j++)
   {
      if(scanf("%d",&amp;b[j])==1)
      count1++;
   }
  </code></pre>