Convert a 2 bytes char array to int
<p>I was confused on how to get this code working:</p>

<pre><code>#include &lt;stdio.h&gt;

int main()
{
    unsigned char xx[]={1,3};

    int xxx=*((int*)xx);
    printf("val is %d\r\n",xxx);
}
</code></pre>

<p>Will the code print 13 or 31? When I tried it, it prints out a big number, not what I was expecting.</p>