
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
20 questions
BJT AC Analysis Round1
Quiz
•
University
17 questions
Week 8: Feelings and emotions
Quiz
•
University
15 questions
Quiz on Islamic Finance
Quiz
•
University
15 questions
AMT 221 Semifinal Long Quiz
Quiz
•
University
15 questions
Basic First Aid Quiz
Quiz
•
12th Grade - University
20 questions
Social Casework
Quiz
•
University
20 questions
RM 263 - Research Methods
Quiz
•
University
17 questions
Basics of Programming with C
Quiz
•
University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Other
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University
