wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Quize-OOPS

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which access specifier provides the highest level of protection?

a)

Private

b)

Protected

c)

Public

d)

None of the above

2.

What is the main benefit of encapsulation in C++?

a)

Faster Execution

b)

Better UI design

c)

Data Security and abstraction

d)

Simplify syntax

3.

Which access specifier is commonly used to hide data in abstraction?

a)

Public

b)

Private

c)

Protected

d)

Any one of these

4.

What is multiple inheritance in C++?

a)

A class derived from more than one class.

b)

A Class that has more then one objects.

5.

Which access specifier allows members to be accessed only within the class?

a)

Public

b)

Private

c)

Protected

d)

All of them.

6.

What will be the size of an empty class in C++?

a)

0

b)

1

c)

2

d)

3

7.

A member function can always access the data in ______, ( in C++).

a)

The class of which it is member.

b)

The object of which it is a member.

c)

The public part of its class.

d)

The private part of its class.

8.

Which header file is required in C++ to use OOP?

a)

OOP can be used without using any header file.

b)

stdlib.h

c)

iostream.h

d)

stdio.h

9.

Which among the following doesn't come under OOP concept?

a)

Data hiding.

b)

Message passing.

c)

Platform Independent.

d)

Data binding.

10.

Which feature of OOP is indicated by the following code?

class student{ int marks; };

class topper: public student{ int age; topper(int age){ this.age=age; } };

a)

Encapsulation and Inheritance.

b)

Inheritance and Polymorphism.

c)

Polymorphism.

d)

Inheritance.