It was a telephonic interview and he asked me to write a small code and read it. The programming question was how will you identify whether a system is little endian or big endian? write a code for that.
Sigiloso
#include int main() { unsigned int i = 1; char *c = (char*)&i; if (*c) printf("Little endian"); else printf("Big endian"); getchar(); return 0; }