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 C++ exceptional handling?
What is the difference between public and private data members?
Difference between pointer to constant and constant pointer to a constant. Give example.
What is anonymous object in c++?
How is c++ used in the real world?
Does a derived class inherit or doesn't inherit?
What's the hardest coding language?
what is a class? Explain with an example.
What are c++ data types?
What is the difference between global variables and local variable
What are arrays c++?
How a macro differs from a template?
What are shallow and deep copy?
Why is c++ is better than c?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.