author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Sat, 15 Aug 2009 23:05:54 +0200 | |
changeset 106 | a540a842ddef |
parent 105 | c19e37122deb |
child 107 | 244356bc3a20 |
--- a/endian.c +++ b/endian.c @@ -11,12 +11,12 @@ unsigned short word = 0x1234; unsigned char *p = (unsigned char *)&word; - return ((p[0] == 0x34) ? 0 : 1); + return (p[0] == 0x34); } int main (int argc, char **argv) { - printf ("%s Endian System\n", (endian ())? "Big" : "Little"); + printf ("%s Endian System\n", (endian ())? "Little" : "Big"); return EXIT_SUCCESS; }