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 are disadvantages of C language.
How can you tell whether two strings are the same?
What is the difference between union and anonymous union?
Is exit(status) truly equivalent to returning the same status from main?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Why c is a procedural language?
How do you convert strings to numbers in C?
What is a substring in c?
Hi can anyone tell what is a start up code?
Why doesn't C support function overloading?
Write a Program to find whether the given number or string is palindrome.
why we wont use '&' sing in aceesing the string using scanf
Was 2000 a leap year?
Where can I get an ansi-compatible lint?
What is assert and when would I use it?