Suppose I have this code:
unsigned short svalue;
unsigned char hibyte, lobyte;
svalue = 0xABCD;
hibyte = (svalue >8) & 0xFF;
lobyte = svalue & 0xFF;
Will this result in the values of hibyte and lobyte being 0xAB and 0xCD
respectively, regardless of whether the platform is little or big endian?
Thanks for your help.
Regards,
Charles Sullivan
Comment