what's the difference between function overloading and
function overiding?

Answers were Sorted based on User's Feedback



what's the difference between function overloading and function overiding?..

Answer / a srinivas rao

function overloading is the process of defining the same
function name with different arguments,number of
arguments ,or ordinal positions of arguments.

function overriding is the process of defining the Base
class function in the derived class with different code
implementation.

Is This Answer Correct ?    63 Yes 5 No

what's the difference between function overloading and function overiding?..

Answer / vinita taneja

1.function overloading is the function having same name but with different signatures whereas , if there is a member function having same name in both base and derived class , then the member function of derived class will be executed and this is called function overriding.

2.there is no concept of inheritance in function overloading whereas it is there in function overriding.

3.in function overloading , signatures must be different whereas in function overriding , signatures must be same.

Is This Answer Correct ?    26 Yes 0 No

what's the difference between function overloading and function overiding?..

Answer / mms zubeir

Function overloading is providing more than one function
with the same name which will operate on different
type/number of input data. Most probably, the kind of
operation will not be changed.

Function overriding is nothing but giving different
operations with the same function name and with same type
of input data (that is, the signature is not being changed)
depending upon the context (the context here means that the
class that holds the function of a hierarchy of classes)

Is This Answer Correct ?    18 Yes 7 No

what's the difference between function overloading and function overiding?..

Answer / mishtu

not necessary to have same return type in function overloading

Is This Answer Correct ?    12 Yes 7 No

what's the difference between function overloading and function overiding?..

Answer / niranjan ambati

The above answers are correct but some more things can be
added to the above stuff..
Function overloading is the function which is defined more
than once with a different argument types and no. of
arguments, but all these functions should have the same
return type.

Function overriding is the function which is defined in
base class and derived classes with the different
implementations.

Is This Answer Correct ?    5 Yes 12 No

Post New Answer

More STL Interview Questions

How can you create a bulleted list, numbered list and an outline by using bullets and numbering command. Explain with the help of example.

0 Answers  


Write a program in C++ to concatenate two strings into third string using pointers

5 Answers  


How connect plc and pc through software

0 Answers  


Define the terms: field, record, table and database

5 Answers  


what is c++

2 Answers  






If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula: The population growth rate is given by the formula: B – D Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number of years. The program should then calculate and print the estimated population after n years. Your program must have at least the following functions: 1. growthRate: This function takes its parameters the birth and death rates, and it returns the population growth rate. 2. estimatedPopulation: This function takes its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years Your program should not accept a negative birth rate, negative death rate, or a population less than 2. please answer my question ....

0 Answers   Microsoft,


What is the stl, standard template library?

0 Answers  


i want a road rash 3d game code if some one know please help me

1 Answers  


how to overload << and >> operator in c++

3 Answers   Wipro,


How stl is different from the c++ standard library?

0 Answers  


Distinguish between: a) Normal layout & Print Layout views b) Windows Clipboard & office Clipboard c) Save & Save As Commands d) Program File & Data File e) Pie Charts & Barr Charts

0 Answers  


what is a template?

2 Answers   Amazon, BITS, IBS, Wipro,


Categories