What is size of a empty class?

Answer Posted / mashal

Size of an empty class is 1 byte. It is non zero to ensure that the two different objects will have different addresses.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How a modifier is similar to mutator?

890


What is the basic difference between C and C++?

849


What is the type of this pointer in c++?

829


What is a namespace in c++?

1438


What are the types of array in c++?

826


What is the use of cmath in c++?

800


What are protected members in c++?

882


What is a dangling pointer in c++?

856


What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00

831


What is insertion sorting?

865


Explain data encapsulation?

879


What is the difference between an external iterator and an internal iterator?

858


Can union be self referenced?

843


Explain what are mutator methods in c++?

784


Can we declare a base-class destructor as virtual?

766