class A{
public:
char a;
};
class B:public A{
public:
int b;
};
void main(){
B ob;
cout<<sizeof ob<<endl;
}
this program shows the output 8 bytes that is confusing actually is should show 5 bytes because char a size is 1 byte and int b size is 4 byte.....please help me to understand this contradiction ....