Which uses less memory?
a)
struct astruct
{
int x;
float y;
int v;
};
b)
union aunion
{
int x;
float v;
};
c)
char array[10];
Answer Posted / gourav bhatt
Mr Ranjeet u r wron vecause ib ur case too the answer will
be "b" .thats gud that u find misktake in jaroosh example but
the anser is b coz the union has size 4 .
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is #include math h in c++?
Is string data type in c++?
Which function should be used to free the memory allocated by calloc()?
Can a list of string be stored within a two dimensional array?
What is a friend function in c++?
What are the classes in c++?
What is the difference between delegation and implemented-in-terms-of?
How many standards of c++ are there?
What is data binding in c++?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
What is std :: endl?
what is VOID?
Which is better c++ or java?
Difference between Abstraction and encapsulation in C++?
What are virtual functions in c++?