OOP2023_B11B12Quiz_April24

OOP2023_B11B12Quiz_April24

Assessment

Quiz

Created by

MR ARORA

Computers

University

1 plays

Hard

Student preview

quiz-placeholder

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the purpose of the "protected" access modifier in C++ inheritance?

To allow access to the member variables and functions from within the class and its subclasses

To restrict access to the member variables and functions from outside the class

To make the member variables and functions public

To make the member variables and functions private

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the visibility of a superclass's private members in a subclass?

The private members of a superclass are visible to a subclass

The private members of a superclass are not visible to a subclass

The visibility of a superclass's private members depends on the programming language being used

The visibility of a superclass's private members is determined by the access modifiers used in the subclass.

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What are the different types of inheritance in C++?

Single, double, and multiple

Single, double, and hybrid

Single, multiple, and multilevel

Single, double, and multilevel

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is virtual inheritance in C++?

A way to inherit properties and functionalities from multiple classes without creating duplicate copies of the base class

A way to create multiple instances of a class

A method for creating objects without using constructors

A way to group related classes together

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Shape constructor called, Circle constructor called, Cylinder constructor called, Cylinder destructor called, Circle destructor called, Shape destructor called

Shape constructor called, Cylinder constructor called, Circle constructor called, Circle destructor called, Cylinder destructor called, Shape destructor called

Shape constructor called, Circle constructor called, Cylinder constructor called, Shape destructor called, Circle destructor called, Cylinder destructor called

Cylinder constructor called, Circle constructor called, Shape constructor called, Shape destructor called, Circle destructor called, Cylinder destructor called