title: c get nth byte of integer
body: <p>I know you can get the first byte by using </p>
  
  <pre><code>int x = number &amp; ((1&lt;&lt;8)-1);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>int x = number &amp; 0xFF;
  </code></pre>
  
  <p>But I don't know how to get the nth byte of an integer.
  For example, 1234 is 00000000 00000000 00000100 11010010 as 32bit integer
  How can I get all of those bytes? first one would be 210, second would be 4 and the last two would be 0.</p>