Read binary file in C
<p>I have file test.bin which has content: 33 0F 13 05 54 65 73 74 20 13 06 55 73 65 72 20 31
When I read this file I get such result: 3333203046203133203035203534203635. I can't understand what I do in a wrong way.</p>

<pre><code>void ReadBinFile()
{
    int i;
    FILE *ptr;
    unsigned char buffer2[17];
    ptr = fopen("test.bin","r");
    fread(buffer2,sizeof(buffer2),1,ptr);

    for(i = 0; i&lt;17; i++)
        printf("%x", buffer2[i]);
}
</code></pre>