Motorola Mobility Interview Question
111 Interview Reviews |
Back to all Motorola Mobility Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Systems Engineer at Motorola Mobility:
how to detect the system is big endian or little endian
See more for this Motorola Mobility Systems Engineer Interview
Helpful Question?
Yes |
No
Inappropriate?
1 of 1 people found this helpful
by Brian:
is_big_endian ()
{
int foo;
char *p;
foo = 0x12345678;
p = (char*)& foo;
if (*p == 0x12) {
return 1;
} else {
/* 0x78 */
return 0;
}
}