title: How to subtract integers from characters in C?
body: <p>Brian Kernighnan in his book Programming with C says </p>
  
  <blockquote>
    <p>By definition, chars are just small integers, so char variables and
    constants are identical to ints in arithmetic expressions.</p>
  </blockquote>
  
  <p>Does this mean we can subtract char variable from int ??</p>
  
  <p>I wrote a small piece of code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  main()
  {
      int a ;
      int c;
      a = 1;
      c = 1 - '0' ;
      printf("%d", c);
  }
  </code></pre>
  
  <p>However it gives me output = -47...</p>
  
  <p>What is that I'm doing wrong ?? Are the variables I assigned have the right type??</p>