title: Mod operator with unsigned char
body: <p>I found a very strange behavior using the modulo operator.</p>
  
  <p>Given the following code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdint.h&gt;
  
  int main()
  {   
      uint8_t x = 2;
      uint8_t i;
  
      for(i=0; i&lt;5; i++)
      {
          x = (x - 1) % 10;
          printf("%d ", x);
      }
  
      printf("\n");
  }
  </code></pre>
  
  <p>I expect as a result <code>1 0 3 4 2</code>, but instead I get <code>1 0 255 4 3</code>.</p>
  
  <p>I think it has something to do with the integral promotion, but I don't understand <i>how</i> the conversion is done.</p>