hello Experts ,
i am conduced in following program output..
Code:
#include<iostream.h>
#include<conio.h>
class base
{
    int i;
};
class derived1:base
{
    int j;
};
class derived2:base
{
    int k;
};
class derived3:derived1,derived2
{
    int l;
};
void main()
{
    clrscr();
    derived3 a;
    cout<<sizeof(a);


    getch();

}
i m getting output 10 ...but how it is possible as hear public data member's , and class is inherited as public , how it is possible to inherit private member?

Last edited by shabbir; 31Mar2009 at 07:56.. Reason: Code blocks