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

Since Union follows the memory sharing concept, it is not
possible to initialise all union varibles at a time.

ie.,

union name
{
int a;
char b;
}c = {10, 'a'};

is not possible.

But it is possible to initialise one value at a time.

ie.,

union name
{
int a;
char b;
}c = {10};

or

union name
{
int a;
char b;
}c = {'a'};

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a double c?

941


Can you think of a logic behind the game minesweeper.

2415


write an algorithm to display a square matrix.

2640


how many errors in c explain deply

2036


What is static identifier?

1166


What is the auto keyword good for?

1064


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2276


Why c is a mother language?

965


What is pointers in c with example?

1022


Stimulate calculator using Switch-case-default statement for two numbers

2922


What is a pointer in c plus plus?

1218


how to write optimum code to divide a 50 digit number with a 25 digit number??

3204


Explain what are the __date__ and __time__ preprocessor commands?

1073


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1110


Explain what is wrong in this statement?

1068