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

Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5891


Can include files be nested? How many levels deep can include files be nested?

1083


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1043


How many types of operator or there in c?

1021


What is the function of volatile in c language?

1066


How can I get back to the interactive keyboard if stdin is redirected?

1132


List a few unconditional control statement in c.

924


writ a program to compare using strcmp VIVA and viva with its output.

1974


Do you know what are the properties of union in c?

993


What is self-referential structure in c programming?

1140


Where are some collections of useful code fragments and examples?

1106


Which header file is essential for using strcmp function?

1420


What is formal argument?

1090


What is cohesion in c?

919


When should the const modifier be used?

1058