
C++ Polymorphism Quiz
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
Justine Nichol Pasamonte
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following best illustrates runtime polymorphism in C++?
Two functions named print() with different parameter types
A virtual method overridden in a derived class and called through a base class pointer
Overloading the + operator to add matrices
Defining multiple constructors in a class
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which condition must be met for function overriding to achieve runtime polymorphism in C++?
The derived function must have default parameters
The base class function must be declared with the virtual keyword
Both base and derived class functions must be private
Function names must differ across classes
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What distinguishes operator overloading from function overriding in C++?
Operator overloading changes behavior based on operand types at compile time, while function overriding changes behavior at runtime
Operator overloading is only applicable to arithmetic operators
Function overriding does not support inheritance
Operator overloading uses the virtual keyword
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following correctly explains why compile-time polymorphism executes faster than runtime polymorphism?
It uses inline assembly optimization
The compiler completely eliminates function calls
The function binding is resolved during compilation
It avoids object-oriented features
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What enables polymorphic behavior when calling a function through a base class reference?
The function must be overloaded
The base class must be abstract
The base class function must be declared virtual
The function must return void
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is a limitation of compile-time polymorphism in C++?
It doesn't allow operator overloading
It cannot resolve behavior based on actual object type at runtime
It cannot use static binding
It depends on the use of pointers
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following pairs represent only runtime polymorphism techniques?
Function overloading and inheritance
Function overriding and operator overloading
Templates and overloaded constructors
Virtual functions and overridden methods
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
Air Cargo Management 01
Quiz
•
University
15 questions
Mechanical Lifting
Quiz
•
University
13 questions
Session 3
Quiz
•
University
19 questions
AC Fundamentals
Quiz
•
University
15 questions
Basic concepts in semantics
Quiz
•
University
12 questions
Sperry (1968)
Quiz
•
University
10 questions
Proxy Server
Quiz
•
University
15 questions
Google Cloud Quiz
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for Other
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University
