What is polymorphism? Explain with an example.

Answer Posted / anil sobti

polymorphism means same function or function name but
different behavior.

Is This Answer Correct ?    55 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

2. Give the different notations for the class.\

1587


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

1632


What is constructor in oop?

587


What is abstract class in oop?

529


What is object and class in oops?

586






What is difference between pop and oop?

604


What are the types of abstraction?

553


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1577


What is coupling in oop?

594


What is difference between abstraction and encapsulation?

592


Why oops is important?

606


What is for loop and its syntax?

596


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

1696


Can you name some types of inheritance?

639


What is class and object in oops?

607