• ( 1 ) What is meant by polymorphism?

    • 1) class having many forms
    • 2) class having only single form
    • 3) class having two forms
    • 4) None of these
    • Discussion in forum
      Answer : 1) class having many forms
      Solution : Polymirphism is literally means class having many forms.








      discussion


      Answer : 1) class having many forms

    • ( 2 ) Which of the following correctly describes overloading of functions?

    • 1) Pseudo polymorphism
    • 2) Transient polymorphism
    • 3) Virtual polymorphism
    • 4) Ad-hoc polymorphism
    • Discussion in forum
      Answer : 4) Ad-hoc polymorphism
      Solution :








      discussion


      Answer : 4) Ad-hoc polymorphism

    • ( 3 ) What is meant by polymorphism?

    • 1) class having many forms
    • 2) class having only single form
    • 3) class having two forms
    • 4) None of these
    • Discussion in forum
      Answer : 1) class having many forms
      Solution :








      discussion


      Answer : 1) class having many forms

    • ( 4 ) Run time polymorphism can be achieved with______ .

    • 1) Virtual Base class
    • 2) Container class
    • 3) Virtual function
    • 4) Both 1 & 3
    • Discussion in forum
      Answer : 3) Virtual function
      Solution :








      discussion


      Answer : 3) Virtual function

    • ( 5 ) What is meant by pure virtual function?

    • 1) Function which does not have definition of its own.
    • 2) Function which does have definition of its own.
    • 3) Function which does not have any return type.
    • 4) None of these
    • Discussion in forum
      Answer : 1) Function which does not have definition of its own.
      Solution : As the name itself implies, it have to depend on other class only.








      discussion


      Answer : 1) Function which does not have definition of its own.

    • ( 6 ) Which of the following is true about pure virtual functions?
      1) Their implementation is not known in a class where they are declared.
      2) If a class has a pure virtual function, then the class becomes abstract class and an instance of this class cannot be created.

    • 1) Both 1 and 2
    • 2) Only 1
    • 3) Only 2
    • 4) Neither 1 nor 2
    • Discussion in forum
      Answer : 1) Both 1 and 2
      Solution :








      discussion


      Answer : 1) Both 1 and 2

    • ( 7 ) The polymorphism can be characterized by the phrase

    • 1) One interface,multiple methods
    • 2) Multiple interfaces,one method
    • 3) One interface,one method
    • 4) None of these
    • Discussion in forum
      Answer : 1) One interface,multiple methods
      Solution :








      discussion


      Answer : 1) One interface,multiple methods

    • ( 8 ) Compile-time polymorphism is achieved through

    • 1) function overloading
    • 2) operator overloading
    • 3) Both 1 & 2
    • 4) None of these
    • Discussion in forum
      Answer : 1) function overloading
      Solution :








      discussion


      Answer : 1) function overloading

    • ( 9 ) Usually a pure virtual function

    • 1) has complete function body.
    • 2) will never be called.
    • 3) will be called only to delete an object.
    • 4) is defined only in derived class.
    • Discussion in forum
      Answer : 4) is defined only in derived class.
      Solution :








      discussion


      Answer : 4) is defined only in derived class.

    • ( 10 ) Runtime polymorphism is also known as ___________

    • 1) Subtype polymorphism
    • 2) Parametric polymorphism
    • 3) overloading.
    • 4) None of these
    • Discussion in forum
      Answer : 1) Subtype polymorphism
      Solution :








      discussion


      Answer : 1) Subtype polymorphism





Top