Byte order matters when working with binary protocols, file formats, embedded systems, and low-level debugging. Interviewers ask this question to test whether you understand how integers are stored in memory and how C exposes raw memory.
Explain how you would determine whether a machine is little-endian or big-endian in C.
Your answer should cover:
The interviewer is usually looking for a short low-level explanation plus a small C example. You should be able to describe the memory layout of a value like 0x00000001, explain the role of pointers or byte access, and mention that this technique detects the host machine's runtime representation rather than changing it.