mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-27 15:43:18 +02:00
14 lines
181 B
C
14 lines
181 B
C
#include <stdio.h>
|
|
|
|
int
|
|
main()
|
|
{
|
|
int i = 0x12345678;
|
|
char *x;
|
|
|
|
x = (char *)&i;
|
|
printf ("0x%x\n", *x);
|
|
printf ((*x == 0x78) ? "little endian\n" : "big endian\n");
|
|
return 0;
|
|
}
|