explain about storage of union elements.
Answers were Sorted based on User's Feedback
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 |
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
You have an array of n integers, randomly ordered with value 1 to n-1.The array is such that there is only one and one value occurred twice. How will you find this number?
Derive the complexity expression for AVL tree?
What is meant by keywords in c?
What is the purpose of ftell?
Write a program in C to reverse a number by recursive function?
how to print "hai" in c?
how do we remove the printed character in printf statement and write next it it
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What is the diffences between Windows XP and Windows Visa
What is a far pointer?What is the utility?