
Polymorphism in Object-Oriented Programming Quiz
Quiz
•
Other
•
University
•
Practice Problem
•
Medium
misbah daud
Used 6+ times
FREE Resource
Enhance your content in a minute
19 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is polymorphism in Object-Oriented Programming?
The ability to overload operators
The ability to create templates
The ability to create multiple classes
The ability to treat objects of different classes as objects of a common base class
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of run-time polymorphism?
Operator overloading
Function overloading
Using a base class pointer to call a derived class method
Using templates
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to declare a virtual function in C++?
dynamic
function
virtual
override
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the 'override' keyword indicate in a derived class?
It prevents the function from being overridden
It specifies that the function is overriding a base class function
It indicates that the function is virtual
It creates a new function
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of function templates?
To create multiple functions with the same name
To allow functions to operate with generic types
To overload operators
To define virtual functions
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the context of polymorphism, what is function overloading?
Overriding a base class function in a derived class
Creating a function that can take any type of argument
Using different function names for the same operation
Using the same function name with different parameters
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: 'Animal* a; Dog d; a = &d; a->sound();' if sound() is not virtual?
No output
Dog barks
Animal makes a sound
Compilation error
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
AGORA 2021
Quiz
•
8th Grade - Professio...
20 questions
Songs & Song Artists
Quiz
•
3rd Grade - Professio...
15 questions
Overview of E-Banking
Quiz
•
University
15 questions
PRICING AND ITS OBJECTIVES
Quiz
•
University
20 questions
Principal of marketing chapter 2
Quiz
•
University
15 questions
GAME QUIZ!!
Quiz
•
University
19 questions
Module 7: Digital Storage Quiz
Quiz
•
University
20 questions
GRizal Review
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University
