What is the difference between "overloading" and "overridding"?
Answer Posted / shakti singh khinchi
Overloading: When more then 1 methods in a class having same
name but they are different in their number of parameters,
different in their parameters types and their order.
Overriding: When a parent class is derived by a child class
and some method which has present in parent class which is
declared as "virtual" in parent class , same method with
same name and parameters and sam type is also declared in
child class without "virtual" keyword, bcz it is by default
virtual in child. SO PARENT AND CHILD CLASS USES SAME METHOD
ARE CALLED OVERRIDING.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Is there finally in c++?
Evaluate !(1&&1||1&&0) a) Error b) False c) True
What is a syntax in c++?
Which programming language is best?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
Define pointers?
Explain about Garbage Collector?
Can we make any program in c++ without using any header file and what is the shortest program in c++.
what are the events occur in intr activated on interrupt vector table
What is the difference between an enumeration and a set of pre-processor # defines?
What is a .lib file in c++?
What is size of string in c++?
What is a modifier in c++?
What is the best ide for c++?
Define Virtual function in C++.