why overriding?

Answers were Sorted based on User's Feedback



why overriding?..

Answer / ejaz

In two classes(having parent child/common interface
relation) methods with same signature and execution of
method decided at run time based on object type.

Is This Answer Correct ?    4 Yes 0 No

why overriding?..

Answer / vic

To elaborate on Ejaz's answer, the run time determination
will only happen if the functions being called were declared
as being virtual.

If they weren't, then the function to be called will be
determined at compile time according to the object type.

Is This Answer Correct ?    0 Yes 0 No

why overriding?..

Answer / kamal

same function name and same argument list

Is This Answer Correct ?    5 Yes 6 No

Post New Answer

More OOPS Interview Questions

What is for loop and its syntax?

0 Answers  


What are generic functions and generic classes?

5 Answers  


what is difference between objects and function

3 Answers  


What is oop in simple words?

1 Answers  


What is protected in oop?

0 Answers  






Why u change company?

12 Answers   BOB Technologies,


What is object and class in oops?

0 Answers  


Generally, in all C++ programs, texts are in white colour. Can we change the colour of the text(either input or output or both)? If so, help me out.

1 Answers  


write a program in c++ to overload the function add (s1,s2) where s1 and s2 are integers and floating point values.

4 Answers  


Why we are use # in begning of programme of c++.

2 Answers   Syntel,


Name a typical usage of polymorphism

3 Answers  


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

0 Answers  


Categories