Here is an interesting snippit of code that can determine the byte order of your system - or - it's Endianness.
- #include <endian.h> 
- #include <stdio.h> 
-   
- int main (void) { 
- #if BYTE_ORDER == LITTLE_ENDIAN 
-   printf("system is little Endian \n"); 
- #elif BYTE_ORDER == BIG_ENDIAN 
-   printf("system is big Endian \n"); 
- #else 
- #endif 
-   return 0; 
- }