Which Endian Is Up?
/* This program prints the bytes of a C integer in memory order to show
if the system is big- or little- endian. */
#include <stdio.h>
main()
{
int num = 0x78AB12EF;
int i;
char *scan;
printf("0x%X ", num);
scan = (char *)#
for(i = 0; i < sizeof num; ++i)
printf(" %02X", *scan++ & 0x0ff);
printf("\n");
}