Answer Posted / hitesh sojitra
When you calculate the size of a empty class that time you can c it takes 1 byte.which is the size of a char which a compiler takes for storing the address of a empty class.
The size of an empty class would depend on what is the range specified for the compiler for char. It takes that much space to store the address of a class.
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
What is #include iostream?
To what does “event-driven” refer?
What is a loop? What are different types of loops in c++?
Why do we use double in c++?
State the difference between delete and delete[].
What is a v-table?
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
How can an improvement in the quality of software be done by try/catch/throw?
What does catch(…) mean?
Difference between overloading vs. Overriding
Explain the concept of friend function in c++?
What is the difference between a template and a macro?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
How do you invoke a base member function from a derived class in which you’ve overridden that function?
Which ide is best for c++?