#include <stdio.h>
int isLittleEndian(void) { unsigned int i = 0x01; return (*((unsigned char *)&i)); } int main(void) { printf("Is the machine little endian: %s\n", isLittleEndian()?"YES":"NO"); }
No comments:
Post a Comment