What is polymorphism ? Explain with examples

Answer Posted / nisha

Polymorphism means one name,many properties.Example of
polymorphism is function overloading whare we can have many
functions with same name but having different properties
like the number of arguments in the function header.

Is This Answer Correct ?    43 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is static modifier?

644


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

1662


What is overloading and its types?

630


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1706


What is oops and its features?

597






Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

649


What does no cap mean?

600


What is the fundamental idea of oop?

646


What is destructor in oop?

631


Explain the advantages of inheritance.

682


what type of questions

1701


What is new keyword in oops?

601


Can private class be inherited?

627


Whats oop mean?

607


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3564