Write a small C program to determine whether a machine's
type is little-endian or big-endian.
Answer Posted / vasundhara
int main()
{
int x=1;
if(*(char*)&x)
printf("little endian");
else
printf("big endian");
return 0;
}
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is substring in c?
How can I ensure that integer arithmetic doesnt overflow?
What are the 5 data types?
What is a function simple definition?
What is fflush() function?
Is c still relevant?
What is structure packing in c?
What type is sizeof?
What is the difference between array and linked list in c?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
write a proram to reverse the string using switch case?
What is clrscr ()?
if p is a string contained in a string?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
What is the purpose of scanf() and printf() functions?