answersLogoWhite

0

What is overriding in c?

Updated: 12/8/2022
User Avatar

Wiki User

11y ago

Best Answer

Overriding relates to derived classes, where the derived class provides a new implementation for a method declared in the base class. The override is said to be a more-specialised implementation of the base class method, which is itself described as being a generic method. However, the derived class method can still call the base class method, if required.

When the designer of a class can predict that their class will be derived from, they will normally provide virtual methods. These methods are expected to be overridden by the derived class. Overriding a non-virtual method can have side effects if the method is also overloaded. Overriding just one overloaded method will effectively hide all the other overloads in the base class, which may be undesirable.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is overriding in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is overriding a dynamic polymorphism in c plus plus or not?

In C++, overriding and function, method, or operator is a different thing than (dynamic) polymorphism, so overriding a polymorphic method is almost entirely possible.


How is hiding method different from overriding method in c sharp?

Hiding means a class cannot see the definition. Overriding implies that a class must see that to "override"


Make a sentence with the word overriding?

Your safety is our overriding consideration.


What is the opposite of overriding?

The opposite of the gerund overriding would be approving or endorsing.(In the US Congress, the failure to override a veto is confirming it.)The adjective overriding (meaning of primary importance, overarching) has the opposites secondary, insignificant, negligible, or unimportant.


What was first boycott was overriding on?

blacks


How can you end a veto?

by overriding the veto


Is it possible to do method overloading and overriding at a time?

no we cannot do both at the same time because overloading requires different arguments and overriding dosenot


When the concept of method overriding is necessary?

concept of overriding is very important as due to overriding the derived class can use the function of the base class! when the function has same name and prototype in both the classes(base and derived) then the derived class can use the funtion of base class!


What power belongs on this list?

Overriding a presidential veto


What is the overriding purpose of a speech or written work?

intent


Is it possible to implement method overriding in each and every type of inheritance?

Yes. Method Overriding is not possible without inheritance and it can be done in all possible types of inheritance.


What is a operator overriding in java?

Java does not support object overriding. It does support operator overloading by means of the "+" symbol which is used for both numeric addition as well as string concatenation.