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

can we initialize all the members of union?

Answer Posted / banavathvishnu

union
{
int a;
char ch;
float f;
}tt = {10};
main()
{

printf("%c",tt.ch);
}

In union it is enough to initialise one variable, same
value will reflect the value in remaning members also.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

1113


Write a program to reverse a given number in c?

1039


What is the use of sizeof?

1022


What is #line?

1059


What is the purpose of & in scanf?

1078


What is the size of enum in bytes?

1089


how to construct a simulator keeping the logical boolean gates in c

2261


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2076


What is the explanation for cyclic nature of data types in c?

1221


What are void pointers in c?

997


Describe newline escape sequence with a sample program?

1121


Differentiate between full, complete & perfect binary trees.

1109


What is the use of typedef in c?

1035


What are the 32 keywords in c?

1094


Explain what is wrong in this statement?

1125