#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
class first
{
private:
int x, y;
public:
virtual void input()=0;
virtual void output()=0;
};
class second : public first
{
private:
int len;
char line[20];
public:
void input();
void output();
};
void second :: input()
{
cout<<"Enter any string : ";
gets(line);
}
void second :: output()
{
len = strlen(line);
cout<<"The length of the entered string is : "<<len;
}
int main()
{
class first *ptr;
class second obj;
ptr = &obj;
clrscr();
ptr -> input();
ptr -> output();
getch();
return 0;
}