Guest User

Untitled

a guest
Jan 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. #define BIG_ENDIAN 0
  2. #define LITTLE_ENDIAN 1
  3.  
  4. int testByteOrder() {
  5. short int word = 0x0001;
  6. char *byte = (char *) &word;
  7. return (byte[0] ? LITTLE_ENDIAN : BIG_ENDIAN);
  8. }
Add Comment
Please, Sign In to add comment