title: Why does subtracting '0' in C result in the number that the char is representing?
body: <p>Can someone explain why this works?</p>
  
  <pre><code>char c = '9';
  int x = (int)(c - '0');
  </code></pre>
  
  <p>Why does subtracting '0' from an ascii code of a char result the number that that char is representing? </p>