Write a program to check the endianness (Big endian or little endian) of the machine
We all know that while executing a program, they store their data in memory. Memory can assumed as a large array of bytes. The endianness of the machine indicates in which order the data gets stored in the memory. Please refer this and this link for a detailed introduction to this topic. Here is the…