Am I doing something wrong here or what is it that cause the number to come out backwards?
This is the result:Code:unsigned char bytes[3]; unsigned short large = 0x87E5; printf("%x\n", large); memcpy(&bytes, &large, 2); printf("%x%x\n", bytes[0], bytes[1]);
87e5
e587