difference between structure and union.
Answer Posted / siva sankari
struct employee
{
int a[20];// for tis size 20 was allocated in memory
char text;// for tis only 1byte of memory space is allocated
}
so totally 21 in size was allocated in memory space
union employee
{
int a[20];// for tis size 20 was allocated in memory
char text;// for tis only 1byte of memory space is allocated
}
but in union it takes only the maximum memory space so for each 20space totally 40 size was allocated in memory space
Is This Answer Correct ? | 7 Yes | 12 No |
Post New Answer View All Answers
What is difference between class and object with example?
What is polymorphism explain?
What is difference between abstraction and encapsulation?
What is polymorphism in oop example?
Is react oop?
What does oop mean in snapchat?
Prepare me a program for the animation of train
What is polymorphism and types?
What are the three parts of a simple empty class?
Why do we need oop?
What is property in oops?
How can you overcome the diamond problem in inheritance?
Why do we need polymorphism in c#?
What are the advantages of polymorphism?
What is polymorphism used for?