title: Inputting EOF notation when using getch() for standard input
body: <p>here is a fragment of my program</p>
  
  <pre><code>     #include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  int main(void)
  {
      int c;
      while ((c = getch()) != EOF)
      {
          if (c == '\t')
          {
              putchar('\\');
              putchar('t');
          }
          else if (c == '\b')
          {
              putchar('\\');
              putchar('b');
          }
          else if (c == '\\')
          {
              putchar('\\');
              putchar('\\');
          }
          else if (c == '\r')
          {
              puts("\\n");
            //  putchar('\n');
          }
          else{
              putchar(c);
          }
      }
      return 0;
  }
  </code></pre>
  
  <p>and I want to terminate my input when I input EOF, but when I input ^Z I only get this:
  <img src="https://i.stack.imgur.com/k5Hwl.png" alt="enter image description here">
  so how can I input ^Z to terminate my input?</p>