#include<iostream.h>
#include<conio.h>
class demo
{
                int x;
public:
                demo()
                                {
                                x=20;
                                }
                void display()
                                {
                                cout<<"X = "<<x<<endl;
                                }
};
void main()
                {
                demo d;
                clrscr();
                d.display();
                getch();
}

161

Advertisements