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
    A. OverloadingI. Since function call is resolved during run time, the execution is Slow.
    B. Early bindingII. Since function call is resolved during compilation time, the execution is much faster.
    C. OverridingIII. Supports compile-time polymorphism.
    D. Late BindingIV. Supports run-time polymorphism.

    Choose the correct answer from the options given below:
  2. Which operator is used for dynamic memory allocation in C++?

  3. Which of the following is not true about constructor
  4. Match the LIST-I with LIST-II
    LIST-I (file mode parameters)LIST-II (Meaning)
    A. ios::ateI. Go to end of file on opening
    B. ios::inII. Open fails if the file already exists.
    C. ios::nocreateIII. Open file for reading only
    D. ios::noreplaceIV. Open fails if the file does not exist.
    Choose the correct answer from the options given below:
  5. Which one of the following is correct, when a class grants friend status to another class ?
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