## Multiple Inheritance in c++ example

What is Multiple Inheritance? Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit characteristics and features from more than one parent object or parent class. Deriving directly from more than one class is usually called multiple inheritance. Since it’s widely believed that this concept complicates the … Read more

## Effective way to Swap two numbers using xor

One of the most effective way to swap two numbers is by using XOR gate. We do not any third variable to store value, therefore it has lower space complexity than the traditional swapping program using third or temporary variable. How it works? To understand this trick, break the statements into unique values: x1 = … Read more

## Program to Draw Hollow diamond Shape in C++

Wap in C++ to Draw hollow Diamond shape in C++   For other triangle and diamonds shapes see –> Patterns and Shapes in C++  PROGRAM: #include<iostream> using namespace std; int main() { int size; cout<<"Enter size of Diamond: "; cin>>size; int z=1; for ( int i=0; i<=size; i++) { for (int j=size; j>i; j–) { cout<<" … Read more

## Find factorial using recursion in C++

Here we will write a C++ program to find factorial using recursion, first we will understand what are factorials of a number and how to find out the factorials of a number. Lets start with what is factorial. What is Factorial of a number: The factorial of a non-negative integer n, denoted by n!, is … Read more