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 / vipul

the program is incorrect bcz in main function %d is used for integer type value and union is same as the structure and there is no return type in the main function thus it will return a charter type value,

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

p*=(++q)++*--p when p=q=1 while(q<=6)

1743


Does c have class?

1084


What is #include stdio h and #include conio h?

1090


Which is better oop or procedural?

1041


How a string is stored in c?

1051


Is there a built-in function in C that can be used for sorting data?

1228


What are the 4 types of functions?

1039


What is the newline escape sequence?

1062


What is the purpose of sprintf?

1119


What is break in c?

1017


Is it possible to have a function as a parameter in another function?

1062


Explain c preprocessor?

1093


What is a sequential access file?

1152


Explain what are linked list?

1037


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

3163