Difference between Overloading and Overriding?
Answer Posted / george ananth
Overloading(Early Binding):
-> having more than one method with the same name but different signature(argument type, return type, no of argument etc)
-> Compile time Polymorphism because in the compile time system required to find which method is called
Overriding(Late Binding):
-> If the function of base class is redefined in in the derived class is called overriding..The method name and signature of the base class must be same in the derived class (this is done using "virtual and override keyword or new keyword)
-> Run time Polymorphism because system doesn't know which method need to invoke at the compile time..
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
Can class objects be passed as function arguments?
Who calls main function?
Why we use #include conio h in c++?
What is the cout in c++?
What is #include ctype h in c++?
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
What are built-in functions? What is the syntax for the definition?
What are the advantages of c++ over c?
What are different types of loops in c++?
What is function overriding in c++?
What is class invariant in c++?
What is a string example?
What operators can you overload in c++?
What is a c++ map?