title: ctrl-d didn't stop the while(getchar()!=EOF) loop
body: <p>Here is my code. I run it in ubuntu with terminal. when I type (a <kbd>Ctrl</kbd><kbd>D</kbd>) in terminal, the program didn't stop but continued to wait for my input.</p>
  
  <p>Isn't <kbd>Ctrl</kbd><kbd>D</kbd> equal to EOF in unix?</p>
  
  <p>Thank you.   </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  main() {
      int d;
      while(d=getchar()!=EOF) {
          printf("\"getchar()!=EOF\" result is %d\n", d);
          printf("EOF:%d\n", EOF);
      }
          printf("\"getchar()!=EOF\" result is %d\n", d);
  }
  </code></pre>