/ Published in: C
You can find out the word sizes and endianness of a device by compiling the following program with a cross compiler and looking at the executable with the `strings` program or a hex editor. The `TESTIF` macro puts a copy of the statement to test and its truth value into a string which will be present in the exe. This helps if you do not have such a device handy, or if it is cumbersome to access (requires loading firmware etc.).