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

using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1800


Write the Program to reverse a string using pointers.

1003


How do you determine the length of a string value that was stored in a variable?

1109


What is equivalent to ++i+++j?

1077


How do I copy files?

1039


What is "Duff's Device"?

1153


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1808


What is the method to save data in stack data structure type?

1070


How can I change the size of the dynamically allocated array?

1136


hi send me sample aptitude papers of cts?

2151


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

2100


What is formal argument?

1123


What is an lvalue?

1053


What does the error 'Null Pointer Assignment' mean and what causes this error?

1197


Process by which one bit pattern in to another by bit wise operation is?

1141