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


Please Help Members By Posting Answers For Below Questions

Give example of a pure virtual function in c++?

689


What is a null object in c++?

740


What is the most useful programming language?

693


What is the size of integer variable?

688


Explain the advantages of using friend classes.

695






Is it possible to provide default values while overloading a binary operator?

871


Do you know what are static and dynamic type checking?

711


How a modifier is similar to mutator?

742


What is function prototyping?

707


What do you mean by enumerated data type?

657


Define namespace in c++?

726


What is stream and its types in c++?

647


What is the type of 'this' pointer?

700


What is an operator function? Describe the function of an operator function?

718


Explain the difference between using macro and inline functions?

686