How to check whether a system is big endian or little endian?
Using Macro,
const int isBigEnd=1; #define is_bigendian() ((*(char*)&isBigEnd) == 0)