Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is substring in c?

1132


How can I ensure that integer arithmetic doesnt overflow?

1083


What are the 5 data types?

1048


What is a function simple definition?

1031


What is fflush() function?

1079


Is c still relevant?

1035


What is structure packing in c?

1024


What type is sizeof?

996


What is the difference between array and linked list in c?

1083


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

1936


write a proram to reverse the string using switch case?

2884


What is clrscr ()?

1056


if p is a string contained in a string?

1795


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2204


What is the purpose of scanf() and printf() functions?

1173