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...

union
{
char ch[10];
short s;
}test;
test.s = 0xabcd;


main()
{
printf("%d",ch[10]);
}

Answer Posted / shrikant auti

The code written is incorrect......
union
{
char ch[10];
short s;
}test;
test.s = 0xabcd;


main()
{
printf("%d",ch[10]);/*%D CAN'T BE USED FOR CHARACTER
EXTRACTION*/
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do character constants represent numerical values?

1399


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3309


Explain the difference between strcpy() and memcpy() function?

1065


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1981


Can we change the value of static variable in c?

1078


Why functions are used in c?

1198


Explain why can’t constant values be used to define an array’s initial size?

1401


how should functions be apportioned among source files?

1167


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

1057


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

1104


What is extern keyword in c?

1187


Why do we use namespace feature?

1121


How do we open a binary file in Read/Write mode in C?

1278


What is the importance of c in your views?

1238


Are the variables argc and argv are always local to main?

1082