title: Why don't I get an integer overflow when adding two chars?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4814668/addition-of-two-chars-produces-int">Addition of two chars produces int</a>  </p>
  </blockquote>
  
  
  
  <p>Given the following C++ code:</p>
  
  <pre><code>unsigned char a = 200;
  unsigned char b = 100;
  
  unsigned char c = (a + b) / 2;
  </code></pre>
  
  <p>The output is 150 as <em>logically</em> expected, however shouldn't there be an integer overflow in the expression <code>(a + b)</code>?</p>
  
  <p>Obviously there must be an integer promotion to deal with the overflow here, or something else is happening that I cannot see. I was wondering if someone could enlighten me, so I can know what it is I can and shouldn't rely on in terms of integer promotion and overflow.</p>