Polymorphism – MCQs July 22, 2025 by u930973931_answers 30 Score: 0 Attempted: 0/30 Subscribe 1. : What is the concept of polymorphism in C++? (A) Data hiding (B) Multiple forms of a function or operator (C) Data encapsulation (D) None of the above 2. : Which type of polymorphism is resolved during compile time? (A) Static polymorphism (B) Dynamic polymorphism (C) Runtime polymorphism (D) Late binding 3. : Which mechanism is used to implement runtime polymorphism? (A) Function overloading (B) Operator overloading (C) Virtual functions (D) Constructors 4. : What is required in the base class to achieve runtime polymorphism? (A) Static functions (B) Virtual functions (C) Friend functions (D) Inline functions 5. : Which keyword is used to prevent further overriding of a function? (A) final (B) const (C) static (D) protected 6. : Which of the following best describes function overloading? (A) Multiple functions with different names (B) Multiple functions with the same name but different parameters (C) Functions with same name and same parameters (D) Functions with different return types 7. : Polymorphism helps in: (A) Reducing code duplication (B) Code readability (C) Reusability of code (D) All of the above 8. : Which of the following is NOT a type of polymorphism in C++? (A) Compile-time polymorphism (B) Run-time polymorphism (C) Inheritance-based polymorphism (D) Conversion polymorphism 9. : What does late binding mean? (A) Binding during compile time (B) Binding during runtime (C) Binding variables to constants (D) None of the above 10. : Which keyword ensures a function is not overridden in derived classes? (A) final (B) override (C) sealed (D) virtual 11. : Can constructors be virtual in C++? (A) Yes (B) No (C) Only static constructors (D) Only destructors can 12. : Which feature allows the same function to behave differently based on the object calling it? (A) Encapsulation (B) Polymorphism (C) Abstraction (D) Inheritance 13. : Virtual functions must be: (A) Defined in derived class (B) Declared with virtual keyword in base class (C) Overloaded functions (D) Static 14. : What is the default behavior of functions in C++ without the virtual keyword? (A) Static binding (B) Dynamic binding (C) No binding (D) Constant binding 15. : Which of the following cannot be overloaded? (A) Assignment operator (=) (B) New operator (C) Scope resolution operator (::) (D) Arithmetic operators 16. : What is necessary for dynamic polymorphism to work? (A) Function templates (B) Function overloading (C) Virtual functions and inheritance (D) Inline functions 17. : Which operator is commonly used to resolve polymorphic calls? (A) :: (C) . (D) Virtual table 18. : What is a vtable in C++? (A) A type of array (B) A lookup table used for dynamic dispatch (C) A virtual memory table (D) None of the above 19. : Overriding happens between: (A) Same class functions (B) Base and derived class functions (C) Template functions (D) Constructor functions 20. : Function overloading is a form of: (A) Runtime polymorphism (B) Compile-time polymorphism (C) Static variable binding (D) Virtual inheritance 21. : What kind of polymorphism is achieved by virtual functions? (A) Compile-time (B) Runtime (C) Parametric (D) Ad-hoc 22. : Which of the following supports method overriding? (A) Static functions (B) Friend functions (C) Inherited virtual functions (D) Constructor overloading 23. : Which keyword must be used in the derived class when overriding a virtual function (C++11 onwards)? (A) override (B) virtual (C) final (D) mutable 24. : Which kind of polymorphism allows you to call functions of the same name with different parameters? (A) Ad-hoc (B) Compile-time (C) Runtime (D) Dynamic 25. : Which of these supports compile-time polymorphism? (A) Function overloading (B) Operator overloading (C) Both A and B (D) None 26. : Which function is used to destroy objects polymorphically? (A) Constructor (B) Virtual destructor (C) Static function (D) Inline function 27. : What does the virtual keyword signify in a class member function? (A) Function is called at compile time (B) Function can’t be overloaded (C) Function can be overridden (D) Function is deleted 28. : What allows a base pointer to call derived class methods in C++? (A) Function templates (B) Virtual functions (C) Static methods (D) Inline functions 29. : Which of the following is NOT an example of polymorphism? (A) Method overloading (B) Method overriding (C) Using a function pointer (D) Encapsulation 30. : What does polymorphism enable in object-oriented programming? (A) Security (B) Flexibility and reusability (C) Faster execution (D) More memory usage