STRING CONCATENATION USING OPERATOR OVERLOADING

/*PROGRAM TO IMPLEMENT STRING CONCATENATION USING OPERATOR OVERLOADING*/ #include<conio.h> #include<iostream.h> #include<stdio.h> #include<string.h> class string_concat { char name[20]; public: void input() { gets(name); } void output() { cout<<name<<endl; } string_concat operator+(string_concat …

PROGRAM TO OVERLOAD BINARY +,-,*,/ OPERATORS

/*PROGRAM TO OVERLOAD BINARY +,-,*,/ OPERATORS*/ #include<conio.h> #include<iostream.h> class binry_ovrld { int a; public: void input() { cout<<“enter a: “; cin>>a; } void display() { cout<<a<<endl; } binry_ovrld operator+(binry_ovrld b2) …

PROGRAM TO IMPLEMENT HYBRID INHERITANCE

/*PROGRAM TO IMPLEMENT HYBRID INHERITANCE*/ #include<conio.h> #include<iostream.h> class base { int a; public: base() { cout<<“Enter a: “; cin>>a; } int show() { cout<<“a = “<<a<<endl; return(a); } ~base() { …