class Base
{
int i ;
};
class Derived : public Base { } ;
int main()
{
cout << sizeof(Derived);
}
Output :
4
In Base class , since i is private , it should not be inherited to the Derived Class . Hence , the Base class should act as empty class . And sizeof empty class is 1 , then why it is showing as 4 ?