Diffrernce Between Overloading and Overriding?

Answers were Sorted based on User's Feedback



Diffrernce Between Overloading and Overriding?..

Answer / anupam mittal

In overloading all the function have same name but
different in no. of argument, type of argument and oreder
of argurmnt while in case of overriding both function are
defined in differenet class when a function inherit from
parent class and there is a function with same prototype in
child class then child class function override the parent
class funciton.

Is This Answer Correct ?    11 Yes 2 No

Diffrernce Between Overloading and Overriding?..

Answer / sourisengupta

OverLoading :- Method Name remains the same with different
signatures.
For ex:- Take a method name vehicle.
if u are passing two parameters to it , it will generate
informations for 2 wheelers .
if u are passing four parameters to it, it will generate
informations for 4 wheelers.

shortly we can tell same with different characteristics.

Overriding : - Method name and signatures must be same.
In overriding user can change the behaviour of the method
for the derived class.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More STL Interview Questions

why does the execution of a c++ program start with main()???

11 Answers  


Define the terms: field, record, table and database

5 Answers  


Difference between Structure and Class in C++?

5 Answers   Caritor,


Give the output of the following program main() {int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris");

8 Answers   Sun Microsystems,


Is stl open source?

0 Answers  






write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

0 Answers  


What are the symptoms of stl?

0 Answers  


What is a list in c++ stl?

0 Answers  


What is the name of your birth place?

0 Answers  


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 total number of disk writes by MySQL.

0 Answers  


Is stl part of c++ standard?

0 Answers  


how to use C++?

0 Answers   NIIT,


Categories