title: Confused about getchar() function
body: <p>I am confused about <code>getchar()</code>'s role in the following code. I mean I know it's helping me see the output window which will only be closed when I press the <kbd>Enter</kbd> key.</p>
  
  <p>So <code>getchar()</code> is basically waiting for me to press enter and then reads a single character.</p>
  
  <p>What is that single character this function is reading? I did not press any key from the keyboard for it to read.</p>
  
  <p>Now when it's not reading anything, why does it not give an error saying "hey, you didn't enter anything for me to read"?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      printf( "blah \n" );
      getchar();
      return 0;
  }
  </code></pre>