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


explain about storage of union elements.

Answers were Sorted based on User's Feedback



explain about storage of union elements...

Answer / saranya

union elements share common memory space

Is This Answer Correct ?    18 Yes 0 No

explain about storage of union elements...

Answer / anandi

Union elements can share the common memory spaces.

For eg.

union stu
{
int rno;
int mark;
float total;
};

In this pg, the compiler allocates 4 bytes to store the
union members. Bcoz, in this pg, the float data type only
requires the large memory size, ie, 4 bytes. And the
remaining members can share this 4 bytes. So if u want to
store rno, it will allocate the first 2 bytes.
And also we can store only one value at a time to the
memory.

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More C Interview Questions

Can the sizeof operator be used to tell the size of an array passed to a function?

0 Answers  


suppose there are five integers write a program to find larger among them without using if- else

2 Answers  


Explain two-dimensional array.

0 Answers  


write a C code to reverse a string using a recursive function, without swapping or using an extra memory.

9 Answers   Motorola, TCS, Wipro,


what is the difference b/w NULL and null?

3 Answers   HSBC, IBM,


Differentiate between the = symbol and == symbol?

0 Answers  


What is Full Form of C and Why We use C

23 Answers  


what is structuer?

4 Answers   LG Soft, Wipro,


WAP to accept basic salary of an employee? Calculate it HRA=25%,DA=30%,PF=30%&net salary display all contents?

6 Answers   Finite Infotech, Lovely Professional University, Wipro,


what is difference between procedural language and functional language ?

4 Answers   Wipro,


to convert a string without using decrement operater and string functions

1 Answers  


What will be the result of the following program? main() { char p[]="String"; int x=0; if(p=="String") { printf("Pass 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } else { printf("Fail 1"); if(p[sizeof(p)-2]=='g') printf("Pass 2"); else printf("Fail 2"); } } a) Pass 1, Pass 2 b) Fail 1, Fail 2 c) Pass 1, Fail 2 d) Fail 1, Pass 2 e) syntax error during compilation

10 Answers   IBM,


Categories