Difference between Overloading and Overriding?
Answer Posted / mansi shah
Overloading is evaluaated at compile time whereas
Overriding is evaluated at Run Time.
Overloading method has different Parameters but same name
whereas Overriding is just the implementation of method
define din Base Class.
Overloading does not interfere Base Class whereas
Overriding method must require the method which is declared
in Base Class.
Overloading can be defined in one class,in short term it
does not require separate Base Class to implement the
method,whereas for implementing method overriding the Base
class is necessary..
| Is This Answer Correct ? | 21 Yes | 10 No |
Post New Answer View All Answers
What is scope operator in c++?
Is facebook written in c++?
Is swift faster than go?
Explain the isa and hasa class relationships.
Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02
Why do we use vector in c++?
What is guard code in c++?
Why do we use string in c++?
What is a storage class used in c++?
Is c# written in c++?
How would you use the functions sin(), pow(), sqrt()?
What is a c++ class?
What are the different types of comments allowed in c++?
Can create new c++ operators?
Can we define a constructor as virtual in c++?