What are little endian and big endian types of storage? How can you identify which type of allocation a system follows?

The little endian memory representation allocates the least address to the least significant bit and the big endian is where the highest significant bit takes up the least addressed memory space. We can Identify the system’s usage by defining an integer value and accessing it as a character.
int p=0x2;
if(* (char *) &p == 0x2) printf (“little endian\n”); else printf (“big endian\n”);

Be the first to comment

Leave a Reply

Your email address will not be published.


*