Basics of Object Oriented Programming OOP MCQS

Q.1

_________is a methodology that organizes a program into a collection of interacting objects.

A.

OOP

B.

Fundamental Programming

C.

Both A and B

D.

None of the Given Option

Option: A (OOP)

Explanation : Object-Oriented programming (OOP) refers to a type of programming in which programmers define the data type of a data structure and the type of operations that can be applied to the data structure.

Q.2

A language feature that combine variables and methods in a single package is called _____

A.

Encapsulation

B.

Inheritance

C.

Polymorphism

D.

None of These

Option: A (Encapsulation)

Explanation: Encapsulation is one of the major concepts of the OOP. It states that an object should combine all its attributes (data members) and behaviours (methods) in a single unit.

Q.3

Example of An Object is

A.

CAR

B.

BUS

C.

School Bag

D.

All of These

Option: D (All of These)

Explanation: In OOP, Each and every this considered as an Object.

Q.4

Advantages of Encapsulation are        

A.

Simplicity

B.

Clarity

C.

Better Understanding

D.

All of These

Option: D (All of These)

Explanation: Encapsulation states that each object combine its properties and methods in a single unit. it create simplicity, clarity and better understanding,..  

Q.5

Every object hides its state and show through  behavior . this concept is known as

A.

Encapsulation

B.

Inheritance

C.

Polymorphism

D.

Information Hiding

Option: D (Information Hiding)

Explanation: Information hiding is one of the most important principles of OOP inspired from real life which says that all information should not be accessible to all persons. Private information should only be accessible to its owner.

Q.6

Capture only those details about an object that are relevant to current perspective

A.

Encapsulation

B.

Abstraction 

C.

Polymorphism

D.

Information Hiding

Option: B (Abstraction)

Explanation:

Real life objects have a lot of attributes and many kind of behaviors but most of the time we capture only that part of the objects that is related to the problem we are currently going to solve,  this concept is called “Abstraction”. Abstraction is a way to cope with complexity and it is used to simplify things.

Q.7

Which is not feature of OOP in general definitions

A.

Code reusability

B.

Modularity

C.

Duplicate/Redundant data

D.

Efficient Code

Option: C (Duplicate/Redundant data)

Explanation: OOP promote reusability and discourage redundancy in data.

Q.8

How Many classes can be defined in a program?

A.

01

B.

10

C.

100

D.

As Many As you Want

Option: D (AS Many As you Want)

Explanation: There is no restriction on number of classes in OOP.

Q.9

What is the additional feature in classes that was not in structures?

A.

Data members

B.

Member functions

C.

Static data allowed

D.

Public access specifier

Option: B (Member functions)

Explanation: A Struct cant have member functions. It juct contain data members. 

Q.10

Who invented OOP

A.

Alan Kay

B.

Andrea Ferro

C.

Dennis Ritchie

D.

Barry Boham

Option: A (Alan Kay)

Explanation: Object-Oriented Programming(OOP) was coined by Alan Kay circa 1966 or 1967 while he was at grad school.

On this page we will share OOP MCQs. Object oriented Programming OOP MCQs can be used to prepare MCQs Based Tests.

Leave a Comment