title: Do I need to initialize bits?
body: <p>I have a char and I want to set the 1st bit to 1 and the last bit to 1. I can do this with the following code:</p>
  
  <pre><code>char c;
  c |= 1 &lt;&lt; 0;
  c |= 1 &lt;&lt; 7;
  cout &lt;&lt; c;
  </code></pre>
  
  <p>The question is simple: I just set bits 1 and 8 to 1. Do I need to set bits 2-7 to 0 or this is done by default? If I keep the code as it is above, is there any chance of undefined behavior?</p>