
Quiz on Inheritance in C++

Quiz
•
Computers
•
12th Grade
•
Medium
Julie Yee
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the main purpose of inheritance in C++?
To allow new classes to reuse code from existing classes
To increase the complexity of the code
To eliminate the need for classes
To create new classes from scratch
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which type of inheritance allows a derived class to inherit from multiple base classes?
Multiple Inheritance
Single Inheritance
Hierarchical Inheritance
Multilevel Inheritance
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What happens to public members of a base class when inherited using private inheritance?
They become private in the derived class
They remain public in the derived class
They become protected in the derived class
They are inaccessible in the derived class
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
In C++, which access specifier allows members to be accessible only within the class itself?
Protected
Public
Default
Private
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the default access control for members of a derived class if no access specifier is provided?
Protected
Default
Public
Private
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the visibility of private members of a base class in a derived class?
Public
Inaccessible
Protected
Accessible
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which type of inheritance is most commonly used in C++?
Private inheritance
Protected inheritance
Public inheritance
Default inheritance
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Python study group: Week 2

Quiz
•
12th Grade
9 questions
quis lat soal

Quiz
•
9th - 12th Grade
9 questions
Crash Course Sociology 25

Quiz
•
12th Grade
10 questions
C# Programming Quiz

Quiz
•
12th Grade
10 questions
OOPS in Python

Quiz
•
12th Grade
10 questions
OSI Model - Network Layer

Quiz
•
9th Grade - Professio...
5 questions
Java Inheritance

Quiz
•
9th - 12th Grade
15 questions
Quiz on Object-Oriented Programming (OOP)

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade