You are on page 1of 1

#include<iostream.

h>
#include<conio.h>
class first
{
public:
void show1()
{
cout<<endl<<"show 1 called";
}
private:
void show2()
{
cout<<endl<<"show 2 called";
}
protected:
void show3()
{
cout<<endl<<"show 3 called";
}
};
class second:private first
{
public:
void display()
{
show1();
show3();
}
};
void main()
{
clrscr();
second a;
a.display();
//a.show1();
//a.show3();
getch();
}

You might also like