what are the advantages & disadvantages of unions?
Answers were Sorted based on User's Feedback
Answer / vishnu nayak
Union occupy same memory area for different members in a
union.
Same are is allocated for different data types of the
members of union
eg:
union
{
int a;
char c;
float f;
}temp;
Size of Float will be size of union.
same memory is used for char and int as well.
Advantages: Memory consumption is less.
Disadvanteges: if one of the member variable is updated the
it will be reflected in the remaining 2 variables.
Is This Answer Correct ? | 62 Yes | 18 No |
Answer / vadivelt
Main disadvantage is, all the union member variables cannot
be initialised or used with different values at a time.
Is This Answer Correct ? | 45 Yes | 14 No |
hi any body pls give me company name interview conduct "c" language only
How can a string be converted to a number?
What is main () in c language?
Write a function in c to find the area of a triangle whose length of three sides is given.
What is an arrays?
input any 4 digit number and find the difference of all the digits?
yogesh patil in dell
List the variables are used for writing doubly linked list program.
What is page thrashing?
The program to allow the characters from the input received and send this function to a function check if the characters between letters a to z is a function of y joins as the characters main and output to otherwise return to the original function of the y characters
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??
given post order,in order construct the corresponding binary tree