title: C Left Shift Operator
body: <p>I have the following program:</p>
  <pre><code>#include &lt;stdio.h&gt;
  int main ()
  {
      
      int x = 8;
      printf(&quot;%d %d %d &quot;, x++, x &lt;&lt; 2, x &gt;&gt; 1);
   
  }
  </code></pre>
  <p>The way I feel like this is supposed to go is this way:
  The first number should be 8. Then it gets incremented to 9. 9&lt;&lt;2 is 36 so the second %d is 36. The last one is 8 &gt;&gt; 1 which is 4.</p>
  <p>However, when I put this into the compiler I get '8 32 4' and not '8 36 4'.</p>
  <p>Can someone explain why please?</p>
  <p>Thank you!</p>