Difference between Overloading and Overriding?

Answer Posted / kunal

Overloading - Two or more functions having same name but
different siganture(i.e arguements or return types) for eg.
we have a function named as area then
area();,float area();,area(float a,float b);,float area
(float a,float b);

Overriding - When a function of base class is re-defined in
the derived class.for eg.
base class
{
area(float a,float b);
}
derive class
{
float area();
}

Is This Answer Correct ?    42 Yes 109 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is singleton class in c++?

596


Who invented turbo c++?

607


Explain the difference between struct and class in terms of access modifier.

698


Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300”,”BullCart : 10”) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side

3047


Do you know the use of vtable?

637






What are 2 ways of exporting a function from a dll?

616


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2074


Where must the declaration of a friend function appear?

539


an integer constant must have atleast one a) character b) digit c) decimal point

556


What is the difference between global variables and local variable

539


What is the need of a destructor?

638


Explain one method to process an entire string as one unit?

936


Explain how we implement exception handling in c++?

580


What is a node class in c++?

647


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

619