Skip to content

SAP BASIS-1 SOLUTION

  • Home
  • ABOUT
  • SAP BASIS Tutorial
  • SAP UPGRADE
  • Contact US
  • Privacy Policy
  • Careers-Write for SAPBASIS1SOLUTION
SAP BASIS-1 SOLUTION

C++ OOPS

C++ OOPS

PROGRAM TO SWAP TWO NUMBERS USING TEMPLATE

Byadmin August 26, 2016August 26, 2016

/*PROGRAM TO SWAP TWO NUMBERS USING TEMPLATE*/ #include #include using namespace std; template void swap(t1 a,t2 b) { t1 c; c=a; a=b; b=c; cout

Read More PROGRAM TO SWAP TWO NUMBERS USING TEMPLATEContinue

C++ OOPS

Program to find the square of any number using DEFAULT ARGUMENT

Byadmin August 26, 2016

/*Program to find the square of any number using DEFAULT ARGUMENT*/ #include #include #include double power(double n,int p=2); int main() { double n; cout

Read More Program to find the square of any number using DEFAULT ARGUMENTContinue

C++ OOPS

Program of Virtual function

Byadmin August 26, 2016

/*Program of Virtual function*/ #include #include class A { int a,b; public: void getdata(int p,int q) { a=p; b=q; cout

Read More Program of Virtual functionContinue

C++ OOPS

Program of UNARY operator overloading using friend function

Byadmin August 26, 2016

/*Program of UNARY operator overloading using friend function*/ #include #include class A { int a,b; public: void getdata(int p,int q) { a=p; b=q; } void display() { cout

Read More Program of UNARY operator overloading using friend functionContinue

C++ OOPS

Program of UNARY OPERATOR OVERLOADING using member function

Byadmin August 26, 2016August 26, 2016

/* Program of UNARY OPERATOR OVERLOADING using member function */ #include #include class A { int a,b; public: void getdata(int r,int s) //parameterised constructor { a=r; b=s; } void display() { cout

Read More Program of UNARY OPERATOR OVERLOADING using member functionContinue

C++ OOPS

Program of Multilevel Inheritance

Byadmin August 26, 2016

/*Program of Multilevel Inheritance*/ #include #include class A { int a,b; public: void getdata(int q, int w) { a=q; b=w; } void display() { cout

Read More Program of Multilevel InheritanceContinue

C++ OOPS

Program of Hierarchical Inheritance

Byadmin August 26, 2016August 26, 2016

/*Program of Hierarchical Inheritance*/ #include #include class A { int q; public: void getdata(int w) { q=w; } void display() { cout<<“\n\nq=”<<q<<“\nI am the member of Class A\n”; } }; class B:public A { int e; public: void setdata(int r) { e=r; } void show() { cout<<“\n\ne=”<<e<<“\nI am the member of Class B derived from…

Read More Program of Hierarchical InheritanceContinue

C++ OOPS

Program of Dynamic Constructor

Byadmin August 26, 2016August 26, 2016

/*Program of Dynamic Constructor*/ #include #include #include class abc { char *string; int length; public: abc() { length=0; string=new char[length+1]; strcpy(string,” “); } abc(char *s) { length=strlen(s); string=new char[length+1]; strcpy(string,s); } void display() { cout

Read More Program of Dynamic ConstructorContinue

C++ OOPS

Program of BINARY OPERATOR OVERLOADING using Friend function

Byadmin August 26, 2016

/*Program of BINARY OPERATOR OVERLOADING using Friend function*/ #include #include class A { int a,b; public: void getdata(int c,int d) { a=c; b=d; } void add() { cout

Read More Program of BINARY OPERATOR OVERLOADING using Friend functionContinue

C++ OOPS

Program of VIRTUAL Base class

Byadmin August 26, 2016

/*Program of VIRTUAL base class*/ #include #include class A { public: A() { cout

Read More Program of VIRTUAL Base classContinue

Page navigation

1 2 Next PageNext

© 2025 SAP BASIS-1 SOLUTION - WordPress Theme by Kadence WP

  • Home
  • ABOUT
  • SAP BASIS Tutorial
  • SAP UPGRADE
  • Contact US
  • Privacy Policy
  • Careers-Write for SAPBASIS1SOLUTION