My Blog
Articles related to programming, computer science, technology and research.

Cpp program to illustrate function overloading by adding

23/03/2017 Categories: Functions. No Comments on Cpp program to illustrate function overloading by adding

A C++ program to¬†illustrate function overloading by adding different types of numbers. Program is as follows: #include <iostream> using namespace std; int sum(int a, int b) { return a+b; } float sum(float a, float b) { return a+b; } int main() { int a,b; cout<<“Enter two numbers: “; cin>>a>>b; cout<<“Sum of a and b is: […]

Read the rest of this entry »

CPP program to illustrate the use of default arguments

05/03/2017 Categories: Functions. No Comments on CPP program to illustrate the use of default arguments

A program to illustrate the use of default arguments for simple interest function. Program is as follows:

Input and output for the above program are as follows:

 

Read the rest of this entry »

CPP program to illustrate function overloading

05/03/2017 Categories: Functions. No Comments on CPP program to illustrate function overloading

A program to illustrate function overloading using2 overloading functions for power. Program is as follows:

Input and output for the above program are as follows:

 

Read the rest of this entry »

CPP program to illustrate inline functions

05/03/2017 Categories: Functions. No Comments on CPP program to illustrate inline functions

A program illustrating inline functions. Program is as follows:

Input and output for the above program are as follows:

 

Read the rest of this entry »

CPP program to implement call by value and call by reference

05/03/2017 Categories: Functions. No Comments on CPP program to implement call by value and call by reference

A program to implement call by value and call by reference using reference variable. Program is as follows:

Input and output for the above program are as follows:

 

Read the rest of this entry »
Scroll Up