Write a small C program to determine whether a machine's
type is little-endian or big-endian.
Answer Posted / mohana
The below code snipeet tells whether the system is little
or big endian.
int main()
{
int x=1;
if(x)
printf("big endian");
else
printf("little endian");
return 0;
}
| Is This Answer Correct ? | 7 Yes | 24 No |
Post New Answer View All Answers
What are header files in c?
What is #include cctype?
Do you have any idea about the use of "auto" keyword?
Why dont c comments nest?
What is new line escape sequence?
List some applications of c programming language?
What is indirection? How many levels of pointers can you have?
What do header files do?
Why #include is used in c language?
Explain how do you override a defined macro?
p*=(++q)++*--p when p=q=1 while(q<=6)
Can a local variable be volatile in c?
What is c preprocessor mean?
Explain what are the different data types in c?
What is the difference between exit() and _exit() function?