NEW
Font size
WorksheetsQuize-OOPS
Total questions: 10
Worksheet time: 5mins
Which access specifier provides the highest level of protection?
Private
Protected
Public
None of the above
What is the main benefit of encapsulation in C++?
Faster Execution
Better UI design
Data Security and abstraction
Simplify syntax
Which access specifier is commonly used to hide data in abstraction?
Public
Private
Protected
Any one of these
What is multiple inheritance in C++?
A class derived from more than one class.
A Class that has more then one objects.
Which access specifier allows members to be accessed only within the class?
Public
Private
Protected
All of them.
What will be the size of an empty class in C++?
0
1
2
3
A member function can always access the data in ______, ( in C++).
The class of which it is member.
The object of which it is a member.
The public part of its class.
The private part of its class.
Which header file is required in C++ to use OOP?
OOP can be used without using any header file.
stdlib.h
iostream.h
stdio.h
Which among the following doesn't come under OOP concept?
Data hiding.
Message passing.
Platform Independent.
Data binding.
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; } };
Encapsulation and Inheritance.
Inheritance and Polymorphism.
Polymorphism.
Inheritance.
