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
Differentiate between a for loop and a while loop? What are it uses?
What is a volatile keyword in c?
With the help of using classes, write a program to add two numbers.
Explain how do you generate random numbers in c?
What are qualifiers in c?
What are the functions to open and close the file in c language?
What is 'bus error'?
Here is a good puzzle: how do you write a program which produces its own source code as output?
How can I send mail from within a c program?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What is the advantage of using #define to declare a constant?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
What are the two forms of #include directive?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
What is the use of a static variable in c?