#include
#include
typedef union { unsigned char x1; int x ; }endian; int main(int agrc, char *argv[]) { int x = 1 ; endian endian1; if(*(char *)&x == 1) printf("little endian!/n"); else printf("big endian!/n"); endian1.x = 1; if(endian1.x1==1) printf("little endian!/n"); else printf("big endian!/n"); return 0 ; }