title: Arithmetic with unsigned char
body: <p>Im currently implementing a RC4 decryption and as this algorithm only operates on numbers between 0-255, I want to write as safe code as possible and properly use <code>unsigned char</code> variables instead of plain <code>int</code> ones.</p>
  
  <p>Well, this although confronted me with a situation i cannot fortell what will happen.</p>
  
  <p>Given are 3 vars <code>i</code>, <code>j</code>, <code>k</code>:</p>
  
  <pre><code>unsigned char i = 150;
  unsigned char j = 155;
  unsigned char k = 0;
  </code></pre>
  
  <p>Will the expression <code>k = (i + j) % 256</code> properly set <code>k</code> to <code>49</code> or to <code>255</code> as <code>i+j</code> gets truncated?</p>
  
  <p>Edit: fixed a "j" being spelled as "k"</p>