Difference between Overloading and Overriding?
Answer Posted / manu chaudhary
overloading- having different functions with same function_names but must have different signatures(parameters).
overriding- if a base class have a member function and its derived class also have a member function with same name and signature then when that same name function is called in the main function with the object of derived class then the function in the derived class is called that means the function with sam ename in the base class overrides, and this is known as function overriding.
If you have to call the function of the base class then you can call it within the scope of derived class function by using ::(scope resolution) operator.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is c++ the best programming language?
What is while loops?
What is the difference between a baller and a reference in C++?
How do we implement inheritance in c++?
the first character in the variable name must be an a) special symbol b) number c) alphabet
How does code-bloating occur in c++?
Can manipulators fall in love?
What is the use of setfill in c++?
write a function signature with various number of parameters.
What is the difference between while and do while loop? Explain with examples.
What is pointer with example?
What is problem with overriding functions?
What are the four partitions in which c++ compiler divides the ram?
What is istream and ostream in c++?
Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.