title: small bitoperation problem with unsigned int in combination with unsigned char
body: <p>Hi I got a small conceptual problem regarding bitoperations.
  See the below code where I have a 4byte unsigned int. Then I access the individual bytes by assigning the address's to unsigned chars.</p>
  
  <p>I then set the value of the last byte to one. And perform a shift right on the unsigned int(the 4byte variable). I do not understand why this operation apparantly changes the content of the 3byte.</p>
  
  <p>See code below along with the output when I run it</p>
  
  <pre><code>#include &lt;cstdio&gt;
  
  int main(int argc,char **argv){
    fprintf(stderr,"sizeof(unsigned int): %lu sizeof(unsigned char):%lu\n",sizeof(unsigned int),sizeof(unsigned char));
    unsigned int val=0;
    unsigned char *valc =(unsigned char*) &amp;val;
    valc[3] = 1;
    fprintf(stderr,"uint: %u, uchars: %u %u %u %u\n",val,valc[0],valc[1],valc[2],valc[3]);
    val = val &gt;&gt;1;
    fprintf(stderr,"uint: %u, uchars: %u %u %u %u\n",val,valc[0],valc[1],valc[2],valc[3]);
    return 0;
  }
  
  
  sizeof(unsigned int): 4 sizeof(unsigned char):1
  uint: 16777216, uchars: 0 0 0 1
  uint: 8388608, uchars: 0 0 128 0
  </code></pre>
  
  <p>Thanks in advance</p>