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
Why do we need pointers?
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
Can you pass an array to a function in c++?
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---
What are enumerations?
Define upcasting.
Why ctype h is used in c++?
We use library functions in the program, in what form they are provided to the program?
Why is swift so fast?
Describe the process of creation and destruction of a derived class object?
What is a wchar_t in c++?
Why do we use structure in c++?
Can we declare a base-class destructor as virtual?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
What are associate containers?