17 Nov 2019

  • November 17, 2019
  • Amitraj
// C program to find if machine is little endian or big endian

#include <stdio.h>
int main()
{
unsigned int n = 1;
char *c = (char*)&n;
if (*c)
 {
    printf("Little endian..");
  }
else
{
printf("Big endian..");
}

return 0;
}

OUTPUT:

Little endian..


Translate

Popular Posts