Example
#include<iostream.h>
#include<conio.h>
class demo
{
int x;
public:
demo()
{
demo(int d,int b=5)
{
}
int main()
{
int p,q;
clrscr();
demo d(3);
getch();
return 0;
}
/*=============================================================
OUTPUT
ADDITION OF TWO NUMBER IS::8
*/
#include<iostream.h>
#include<conio.h>
class demo
{
int x;
public:
demo()
{
}
demo(int d,int b=5)
{
cout<<"ADDITION OF TWO NUMBER IS::"<<b+d;
}
};
int main()
{
int p,q;
clrscr();
demo d(3);
getch();
return 0;
}
/*=============================================================
OUTPUT
ADDITION OF TWO NUMBER IS::8
*/
No comments:
Post a Comment