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
There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.
What does new in c++ do?
Does a derived class inherit or doesn't inherit?
Why is c++ so fast?
What do you mean by static variables?
What is a buffer c++?
What does new do in c++?
Can a Structure contain a Pointer to itself?
Define 'std'.
What are shallow and deep copies?
Write a program to interchange 2 variables without using the third one.
What is a storage class? Mention the storage classes in c++.
Should I learn c++ c?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
Describe new operator?