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 declare a variable that will hold string values?

1232


how to build a exercise findig min number of e heap with list imlemented?

2127


What does the error message "DGROUP exceeds 64K" mean?

1277


What are the parts of c program?

1158


What is the right way to use errno?

1119


What are global variables and how do you declare them?

1174


Can we assign string to char pointer?

1184


Can you please explain the difference between syntax vs logical error?

1242


Discuss the function of conditional operator, size of operator and comma operator with examples.

1216


Explain how do you generate random numbers in c?

1134


What is data types?

1142


How can you avoid including a header more than once?

1024


shorting algorithmS

2315


How many loops are there in c?

1165


In C, What is the #line used for?

2333