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
Write a program which uses Command Line Arguments
What is the prototype of printf function?
Is main a class in c++?
How do you write a function that can reverse a linked-list?
What is different in C++, compare with unix?
What does it mean to declare a member function as virtual?
Difference between pointer to constant and constant pointer to a constant. Give example.
What is a loop? What are different types of loops in c++?
What does the nocreate and noreplace flag ensure when they are used for opening a file?
What is polymorphism in c++? Explain with an example?
How many keywords are used in c++?
What are punctuators in c++?
What are the extraction and insertion operators in c++?
What is the this pointer?
Describe the advantage of an external iterator.