title: Clarification needed regarding getchar() and newline
body: <p>I have a doubt regarding using <code>getchar()</code> to read a character input from the user.</p>
  
  <pre><code>char char1, char2;
  char1 = getchar();
  char2 = getchar();
  </code></pre>
  
  <p>I need to get <code>2</code> chars as inputs from the user. In this case, if the user enters the character <code>'A'</code> followed by a <code>newline</code>, and then the character <code>'B'</code>, what will be stored in <code>char2</code> - will it be the newline character or the character <code>'B'</code>? </p>
  
  <p>I tried it on CodeBlocks on Windows, and <code>char2</code> actually stores the newline character, but I intended it to store the character <code>'B'</code>. </p>
  
  <p>I just want to know what the expected behavior is, and whether it is compiler-dependent? If so, what differences hold between turbo C and mingW?</p>