The source code:
main(void) {
unsigned char tmp[5] = {10, 10, 180, 255, 40};
FILE *ff = fopen("aa.bin", "w");
fwrite(&tmp, sizeof(char), 5, ff);
}
When executed and seeing Hex content of the file aa.bin, it looks like this:
0D 0A 0D 0A B4 FF 28
Why the value of 10 is written in two bytes (0D 0A) and char type holds only 1 byte. and what does (0D) means?
I am using G++ compiler (MinGW on Windows) and cpp11.