Finding out endianness using a C program

The way computers store multiple-byte data in memory differs into two types. Each of them follows a different approach to how data is laid…