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

What is the purpose of polymorphism?

760


How Do you Code Composition and Aggregation in C++ ?

24419


How to hide the base class functionality in Inheritance?

738


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3659


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

4042






Where You Can Use Interface in your Project

1506


• What are the desirable attributes for memory managment?

1825


What makes a language oop?

705


What is interface? When and where is it used?

1756


How is polymorphism achieved?

664


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1808


Write a c++ program to display pass and fail for three student using static member function

2922


What do you mean by abstraction?

695


Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

2675


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1618