Programming

No Image

Polymorphism Feature in C++

Polymorphism Feature in C++ Polymorphism means single name but multiple formats and this is one of the crucial features of C++. Furthermore, when there are multiple formats of a single function then choosing an appropriate…


No Image

Inheritance in C++

Inheritance in C++Inheritance is a very important feature of object-oriented programming approach. Further, which provides the mechanism of reusability of classes. Moreover, it is very important to reuse classes which are tested. And this idea…


No Image

Sum of Natural Numbers in C++

Sum of Natural Numbers in C++ Program Description- In this program, a class Sum is declared. Which has two public variables n and i and a public function sum_of_n() which takes an integer argument( user…


No Image

Factorial in CPP Using Class

Factorial in CPP Using Class Program Description- Program that calculates factorial in cpp of a natural number. Further, a class Fact is declared in which there are two public integer¬† variables¬† which are n and…


No Image

Add Two Numbers in CPP

Add Two Numbers in CPP #include<iostream> using namespace std; int main() { int x, y, sum; cout<<” Enter Two Numbers for Addition”<<endl; cin>>x>>y; sum = x + y; cout<< “Sum of Two Numbers is”<<“n”<<sum; return…


No Image

Hello World Program In CPP

Hello World Program In CPP #include<iostream> using namespace std; int main() { cout <<” This is Hello World Program”; return 0; } __________________________________ For output see the video     145  1