title: C - Feof(stdin)-how to indicate end of input in Windows?
body: <pre><code>    int x,y,m;
  for(;;){
      m=scanf("%d %d",&amp;x,&amp;y);
      if (m!=2 || m==EOF){
          break;
      }
      else{
          printf("/%d/%d/\n",x,y);
      }
  }
  if (feof ( stdin )){
    printf("End of input\n");
  }else if(m!=2){
    printf("There was an error\n");
  }
  </code></pre>
  
  <p>Under linux ctrl+D indicates end of input , and for windows ctrl+z is supposed to do the trick, but it doesn't work. Any ideas?</p>