Write a c program to check whether your computer ( processor )  is Little Endian or Big Endian machine?

what is Little Endian and Big Endian

The Little Endian machine the least significant byte is stored in the lowest numbered memory address and the most significant byte in the highest address. Motorola family of processor use big Endian format, in which the least significant byte is stored in the higher numbered memory address and the most significant byte in the lower address.

Here is sample code to check Endianess of a machine.