Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

CPP program to illustrate the order of execution of constructors and destructors in inheritance

Categories: Inheritance. No Comments on CPP program to illustrate the order of execution of constructors and destructors in inheritance

In this article we will learn to implement a CPP program to illustrate the order of execution of constructors and destructors in inheritance. A C++ program is provided below to demonstrate in which order constructors and destructors are executed in inheritance.   Program is as follows: #include <iostream> using namespace std; class A { public: […]

Read the rest of this entry »

CPP program to overload assignment operator

Categories: Polymorphism. No Comments on CPP program to overload assignment operator

In this article we will learn to implement a CPP program to overload assignment operator. A C++ program is provided below to implement overloading of assignment operator.   Program is as follows: #include <iostream> using namespace std; class Number { private: int x; public: Number(int p) { x = p; } Number operator =(Number &n) […]

Read the rest of this entry »

CPP program to overload binary operator using non member function

Categories: Polymorphism. No Comments on CPP program to overload binary operator using non member function

In this article we will learn to implement a CPP program to overload binary operator using non member function. A C++ program is provided below to overload binary operator.   Program is as follows: #include <iostream> using namespace std; class Complex { private: float real; float imag; public: Complex(){} Complex(float r, float i) { real […]

Read the rest of this entry »

CPP program to overload unary operator using member function

Categories: Polymorphism. No Comments on CPP program to overload unary operator using member function

In this article we will learn to implement a CPP program to overload unary operator using member function. A C++ program is overloaded to overload unary operator using member function.   Program is as follows: #include <iostream> using namespace std; class Number { private: int x; public: Number(int p) { x = p; } void […]

Read the rest of this entry »

CPP program for illustrating access specifiers

Categories: Classes and Objects. No Comments on CPP program for illustrating access specifiers

In this article we will learn to implement a CPP program for illustrating access specifiers. A C++ program is provided below for illustrating access specifiers public, private, protected.   Program is as follows: #include <iostream> using namespace std; class A { protected: int x; public: A(int p) { x = p; } }; class B […]

Read the rest of this entry »

Cpp program demonstrating a bank account

Categories: Classes and Objects. No Comments on Cpp program demonstrating a bank account

In this article we will learn to implement a Cpp program demonstrating a bank account. A C++ program is provided below to represent a bank account.   Program is as follows: #include <iostream> using namespace std; class Account { private: string accno; string name; float balance; string bname; string brname; string ifsc; public: Account(string acc, […]

Read the rest of this entry »