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
Should I learn c or c++ or c#?
What does new in c++ do?
What does asterisk mean in c++?
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
Which one between if-else and switch is more efficient?
What is data hiding c++?
What is the difference between #import and #include in c++?
What is data type in c++?
When does a 'this' pointer get created?
What new()is different from malloc()?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
What is DlgProc?
What are the advantages of prototyping?
State two differences between C and C++.
What is encapsulation in c++?