#include <stdio.h> int main() { int x = 0x1020304; char* p = (char*)&x; puts(p[0] == 1 ? "Big endian" : "Little endian"); return 0; }