All Exams Test series for 1 year @ ₹349 only
Question

Which among the following best describes polymorphism ?

The correct answer is
It is the ability for a message/data to be processed in more than one form

Understanding Polymorphism in Programming

Polymorphism is a fundamental concept in object-oriented programming (OOP) that allows objects of different classes to respond to the same message (method call or function call) in different ways. The word itself means "many forms". In the context of the question, it refers to how data or a message can be handled or processed.

Analyzing the Options for Polymorphism

Let's examine each option to see which one best defines polymorphism:

  • Option 1:
    It is the ability for many messages/data to be processed in one way

    This description is incorrect. While polymorphism deals with messages, processing them all in strictly "one way" contradicts the core idea of "many forms". This sounds more like a single, specific operation.

  • Option 2:
    It is the ability for a message/data to be processed in only 1 form

    This is the opposite of what polymorphism means. If a message can only be processed in one form, it lacks flexibility and the "many forms" aspect is missing.

  • Option 3:
    It is the ability for a message/data to be processed in more than one form

    This is the correct definition. Polymorphism allows the same message or data to be interpreted and acted upon in multiple different ways, depending on the context or the object receiving it. For example, a 'speak()' message might result in a 'bark' from a Dog object and a 'meow' from a Cat object.

  • Option 4:
    It is the ability for undefined message/data to be processed in at least one way

    This option is vague and incorrect. Polymorphism applies to defined messages and data types, not "undefined" ones. While it requires processing in at least one way, the key is the possibility of *multiple* ways.

Conclusion on Polymorphism

Based on the analysis, polymorphism fundamentally means that a single interface (like a message or function name) can be used to represent different underlying forms or implementations. Option 3 accurately captures this essence.

Was this answer helpful?

Important Questions from OOPs concept

  1. Match List I with List II

    List IList II
    (Programming Paradigm)(Characteristic)
    A.ImperativeI.Declarative, clausal representation, theorem proving
    B.Object‐orientedII.Side‐effect free, declarative, expression evaluation
    C.LogicIII. Imperative, abstract data type
    D.FunctionalIV.Command‐based, procedural

    Choose the correct answer from the options given below :

  2. Let A be the base class in C++ and B be the derived class from A with protected inheritance. Which of the following statement is false for class B?

  3. A member function can always access the data in _______, (in C++).

  4. Which of the following is not correct for virtual function in C++?

  5. Which of the following is correct (in C++)?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App