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 dev c++ used for?
what are Access specifiers in C++ class? What are the types?
Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)
What is difference between rand () and srand ()?
What is virtual destructor ans explain its use?
Write about the stack unwinding?
How is modularity introduced in C++?
What are pointer-to-members in C++? Give their syntax.
What are 2 ways of exporting a function from a dll?
How are virtual functions implemented in c++?
Why do we use setw in c++?
What is doubly linked list in c++?
What does it mean to declare a destructor as static?
What is command line arguments in C++? What are its uses? Where we have to use this?
What are pointer-to-members? Explain.