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 the types of data types and explain?
What are the functions to open and close the file in c language?
What language is c written?
Why calloc is better than malloc?
What is dangling pointer in c?
what is stack , heap ,code segment,and data segment
Can we access the array using a pointer in c language?
Do pointers take up memory?
write a c program for swapping two strings using pointer
What is a structure member in c?
List some of the static data structures in C?
explain what is a newline escape sequence?
How many main () function we can have in a project?
Is c call by value?
Is malloc memset faster than calloc?