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


Please Help Members By Posting Answers For Below Questions

How to delete a node from linked list w/o using collectons?

2093


What is the difference between constant pointer and constant variable?

753


Explain About fork()?

653


Are comments included during the compilation stage and placed in the EXE file as well?

674


What are void pointers in c?

576






Why is c so important?

601


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

1744


What are the benefits of c language?

651


Are global variables static in c?

681


What does calloc stand for?

653


What are lookup tables in c?

552


Explain what is the best way to comment out a section of code that contains comments?

725


What is character constants?

716


Explain enumerated types.

604


Explain void pointer?

594