title: Hex array to int
body: <p>What am I doing wrong here?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
      unsigned char buff[3];
  
      buff[0] = 0x00;
      buff[1] = 0x11;
      buff[2] = 0x00;
      buff[3] = 0x00;
  
      int var = (buff[0]&lt;&lt;24)|buff[1]|buff[2]|buff[3];
      printf ("%u\n", var);
  
      return 0;
  }
  </code></pre>
  
  <p>And the result shown below,</p>
  
  <pre><code>$./a.out
  17
  </code></pre>