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 overload unary operator using member function

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

Post Views: 40 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 = […]

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

Post Views: 14 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; } […]

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

Post Views: 10 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; […]

Read the rest of this entry »

Cpp program to illustrate the use of constructor and destructor

Categories: Classes and Objects. No Comments on Cpp program to illustrate the use of constructor and destructor

Post Views: 21 In this article we will learn to implement a Cpp program to illustrate the use of constructor and destructor. A C++ program is provided below to demonstrate the use of constructor and destructors. Program is as follows: #include <iostream> using namespace std; class Distance { private: int feet; int inches; public: Distance() […]

Read the rest of this entry »

CPP program for illustrating function overloading in adding the distance between objects

Categories: Classes and Objects. No Comments on CPP program for illustrating function overloading in adding the distance between objects

Post Views: 20 In this article we will learn to implement a CPP program for illustrating function overloading in adding the distance between objects. A C++ program is provided below for adding the distance between objects using function overloading.   We create a distance class with the following: feet and inches as data members member […]

Read the rest of this entry »

Cpp program to create objects of distance class and add them

Categories: Classes and Objects. 4 Comments on Cpp program to create objects of distance class and add them

Post Views: 118 In this article we will learn to implement a Cpp program to create objects of distance class and add them. A C++ program is provided below that adds objects of distance class.   We create a distance class with the following: feet and inches as data members member function to input distance […]

Read the rest of this entry »

Cpp program to illustrate function overloading by adding two numbers

Categories: Functions. No Comments on Cpp program to illustrate function overloading by adding two numbers

Post Views: 10 In this article we will learn to implement a Cpp program to illustrate function overloading by adding two numbers. A C++ program is provided below to demonstrate function overloading by adding different types of numbers.   Program is as follows: #include <iostream> using namespace std; int sum(int a, int b) { return […]

Read the rest of this entry »