title: Why structure member seems to have an overflown value?
body: <p>In the code below, I get A = -1 as output. I guess, it's because I am overflowing the A-member which is of 3 bits. 
  I have two questions in this regard:</p>
  
  <ol>
  <li>Shouldn't the compiler consider the last 3 bits and ignore the rest, for the member A? Why is the value negative ?</li>
  <li>If all the bits are considered, why do I get the value of B = 0 as output?</li>
  </ol>
  
  <p>I was expecting A would be having a value of 7 but I am clearly misunderstanding something. Please help. </p>
  
  <pre><code>#include  &lt;stdio.h&gt;
  typedef struct
  {
    char A: 3;
    char B: 3;
    char C: 3;
  }my_struct;
  my_struct new_object = {0};
  
  void main(void)
  {
    new_object. A = 63;
    printf("A = %d\n", new_object.A);
    printf("B = %d\n", new_object.B);
  }
  </code></pre>