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

What are the advantage of c language?

0 Answers  


What is character constants?

0 Answers  


What is assert and when would I use it?

0 Answers  


What are the characteristics of arrays in c?

0 Answers  


void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case

9 Answers   Accenture, TCS,


what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }

20 Answers   Infosys,


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

0 Answers  


How can I insert or delete a line (or record) in the middle of a file?

0 Answers  


Write a program to reverse a string.

0 Answers   Global Logic, iNautix, TCS, Wipro,


implement NAND gate logic in C code without using any bitwise operatior.

4 Answers   Alcatel,


Write a program to find the biggest number of three numbers in c?

0 Answers  


why programming language C is still used in operating system's kernel??

1 Answers   Wipro,


Categories