title: Why the output of this getchar and getch is different when printed in int?
body: <p>I use DevCpp, just curious and want to know why this 2 is different,</p>
  
  <pre><code>char ch_1=getchar ();
  printf ("getchar: %d\n", ch_1);
  char ch_2=getch ();
  printf ("getch: %d\n", ch_2);
  </code></pre>
  
  <p>I pressed "Enter" 2 times</p>
  
  <pre><code>
  getchar: 10
  getch: 13
  </code></pre>
  
  <p>It produced 10 and 13, which means <code>getchar</code> produces 10 (ascii of <code>\n</code>) and <code>getch</code> produces 13 (ascii of <code>\r</code>). Why is it different? Why not both 10 or both 13? Why <code>getch</code> produces <strong>carriage return</strong> while <code>getchar</code> produces <strong>new line</strong>?</p>