what is overloading

Answer Posted / rajveer

c++ provide 2types of overloading.
1. Function overloading:- When we create more then 1
function as same name(like Sum)then it's overloading.
this types overloading in perameters are deffrent becouse
compiler is not know which function called. so sum(),sum
(int,int),sum(int float)etc.
2. operatore overloading:- in c++ operatore(+,-,/ etc.)
worked only builtin datatype. but we can use operatore in
user defined data type by operatore overloading.

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we override main method?

609


How oops is better than procedural?

595


Which type does string inherit from?

618


What is a null tree?

632


What is pointer in oop?

541






What is abstraction and encapsulation?

577


What is inheritance write a program to show use of inheritance?

617


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

704


What is polymorphism what is it for and how is it used?

576


Is oop better than procedural?

579


What is the purpose of polymorphism?

683


What is difference between abstraction and encapsulation?

594


What polymorphism means?

624


What is data binding in oops?

590


Can an interface inherit a class?

565