title: When using and int to read character, why is the value 4096 + ascii
body: <p>I was using gcc and was testing various ways to process characters using either integers or characters as the datatype.</p>
  
  <pre><code>int main() {
      int i;      
      printf("Enter a char: ");
      scanf(" %c", &amp;i);
      printf("integer value= %d     char value=%c", i, i);
      return 0;
  }
  </code></pre>
  
  <p>Output:</p>
  
  <pre>
  Enter a char: f    
  integer value= 4198     char value=f</pre>
  
  <p>I am curious about the integer value that is stored.  It looks like the value is equal to 4096 + ascii value of 'f'.  </p>
  
  <p>My question is why is 4096 added to the ascii value of the character?  What does that value represent?   </p>