#include <stdio.h> int main() { int i = 1; (*(char*)&i == 1) ? printf("Little-endian\n") : printf("Big-endian\n"); return 0; }