Apple Interview Question

Write a code to test the endianness of a code. Optimize it to 1 line.

Interview Answer

Anonymous

Oct 14, 2013

int is_big_endian(void) { return (htonl(47) == 47); }

Apple Interview Question: Write a code to test the endianness of a code. Optimize it to 1 line. | Glassdoor