 CPP All : Function Overloading Concepts Concept Notes and Resources Why do we overload functions? #4493

Concept Learning Code Sheets Function overloading for handling different data types #4479

Understanding function overloading concept as a need to handle different data types but for exactly the same purpose.

Function overloading for different number of parameters #4481

Understanding function overloading concept as a need to handle different number of parameters

Same function name but different purpose #4485

Function overloading when function name is same but the objective of function is entirely different.

Same data types and count but signature different #4487

Function overloading when function data types are same, count is also same but signature is different.

Solved Problems Function overloading – Inch to centimeter conversion #4483

Write two overloaded functions as follows:

Function 1:
Convert i

Write two overloaded functions as follows:

Function 1:
Convert integer input parameter which is a number given as inches of some measurement to a double number which is of centimeter measurement

Function 2:
Convert double input parameter which is a number given as inches of some measurement to a double number which is of centimeter measurement

use conversion formula as 1 inch = 2.54 cm.

Also show the implementation of both the functions in the main routine.

Quizzes 