what is function over loading?

Answer Posted / prabhakar

defining a function with a same name with differ in number of arguments r return type r tpe of arguments in one class is called funstion overloading.
for example
class base
{
public:
fun(int a,int b);
fun(char a,char b);
}
above two functions are diffrer in type of arguments.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Advantage and disadvantage of routing in telecom sector

1056


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

1912


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6397


What are the two different types of polymorphism?

916


What are the 4 pillars of oop?

903


What is polymorphism in oop example?

767


Why do we need oop?

892


What are constructors in oop?

815


Describe these concepts: Polymorphism, Inheritance and Abstraction.

900


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

1905


Whats oop mean?

806


Why do pointers exist?

901


to find out the minimum of two integer number of two different classes using friend function

1891


What is purpose of inheritance?

878


Why is encapsulation used?

784