Pergunta de entrevista da empresa Sigma Microsystems

how to determine controller is little endian or bigendane

Respostas da entrevista

Sigiloso

26 de dez. de 2010

write integer and read with char variable if u get first byte little endian if get second that will be big endane

Sigiloso

1 de mai. de 2013

int x = 1; if (*(char *)&x == 1) printf("Little Endian [LSB first]"); // or LED1 ON else printf("Big Endian [MSB first]"); // or LED2 ON