An Armstrong number is a number in which the sum of cubes of individual digits is equal to the Given number. We have already written C and Java program to check armstrong number, now we are writing C++ Program to check Armstrong number. Here we have declared a class named Armstrong with public variables n, […]

In this program we are performing concatenation of two strings using Operator overloading and Dynamic memory allocation. First we are finding the length of the given string using strlen and allocating a char size equals to the length of the respective string.

C++ Program to Check if Two Strings are Equal using Operator Overloading

May 2, 2013

This program uses the concept of Operator overloading to check if the given two Strings are equal or not using the Equality Operator.

Read the full article →

C++ Program to Add Two Numbers using Operator Overloading

April 27, 2013

In this program we can perform addition of two numbers using Operator overloading. Binary operators will require one object as argument so they can perform the operation. If we are using Friend functions here then it will need two arguments. So why do we need one object as an argument here? To understand this, you’ll […]

Read the full article →

C++ Program to Implement Prefix Increment using Operator Overloading

April 24, 2013

In this article we are going to perform Prefix Increment using the operator: ++. We have already discussed about operator overloading in our earlier article, you can read it here. In the below program all we are doing is defining a function called getx() and getting a value from main function and assigning it to […]

Read the full article →

C++ Program to Implement Operator Overloading

April 23, 2013

What not you can do with Object oriented programming. You have the power to do anything. Operator Overloading allows you to perform operations on Objects. For example if you want to change the values of variables to negative we can call the respective object by placing an appropriate operator infront of the object. If we […]

Read the full article →

C / C++ Program to perform Arithmetic Operations

April 11, 2013

This is a simple C and C++ program to perform Arithmetic Operations like Addition, Subtraction, Multiplication, Division and for finding Remainder of two given integers. This program uses a Switch-case to determine which operation to perform. C Program to perform Aruthmetic Operations C++ Program to perform Arithmetic Operations Output:

Read the full article →

C++ Program to Join and Reverse Two Strings

April 6, 2013

In this article we will be dealing with Joining & Reversing two strings in C++. Who would like to write long code when there are predefined functions in the library? That’s what we have done here. So getting to the program we have defined a class with three character pointers and three size variables of […]

Read the full article →

What is Hybrid Inheritance?

April 5, 2013

We have discussed about Single, Multilevel, Multiple and Hierarchical Inheritance. If you are don’t know about Inheritance, Read this article on What is Inheritance. Hybrid Inheritance can be defined as a mixture or presence of two or more Inheritance. Take a look at the picture below: Output:

Read the full article →

C++ Program to Find Minimum Element in an Array using Templates

April 4, 2013

As we have already discussed about Templates concept in our earlier program lets get into Program here. In the minelement function we are accepting two paramenters of the type min. One array and another one is the size of array. First we are defining a variable called small to store the value of 1st element […]

Read the full article →