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
What is microsoft c++ redistributable 2013?
What does h mean in maths?
What are the advantages of early binding?
What are the three forms of cin.get() and what are their differences?
What is the auto keyword good for in c++?
write a program that reads in a file and counts the number of lines, words, and characters. Your program should ask the user to input a filename. Open the file and report an error if the file does not exist or cannot be opened for some other reason. Then read in the contents of the file and count the number of lines, words, and characters in the file. Also print additional information about the file, such as the longest and shortest words, and longest and shortest lines. For simplicity, we define a word to be one or more characters ending with white space (a space, tab, carriage return, etc.). Functions for checking the types of characters can be found in the ctype.h header file, so you want to include this header file in your program. For example, the sentence below could be all that is in a file. This sentence IT 104 is taught in C++. has 32 characters, one line, and six words. The shortest line is 32 characters. The longest line is 32 characters. The shortest word is 2 characters. The longest word is 6 characters
Write a program using display() function which takes two arguments.
How do you declare A pointer to function which receives an int pointer and returns a float pointer
Explain the extern storage classes in c++.
Is there any function that can skip certain number of characters present in the input stream?
Write a program to find the Fibonacci series recursively.
What is a multiset c++?
Do you need a main function in c++?
What are destructors?
When should overload new operator on a global basis or a class basis?