OOP MCQs: Object Oriented Programming MCQ

OOP MCQs. Multiple-Choice questions on Object-Oriented Programming. OOP Q&A.




1- What a default catch block catches ??

(A) no thrown objects

(B) any thrown objects that have been caught by an earlier catch block

(C) all thrown objects

(D) any thrown object that has not been caught by an earlier catch block


2- What term means “the ability to take many forms ??

(A) Inheritance

(B) Encapsulation

(C) Polymorphism

(D) Function


3- How runtime polymorphism is achieved ??

(A) By Virtual function

(B) By Friend function

(C) By Method Overloading

(D) None


4- C++ is a procedural as well as an Object-Oriented programming language ??

(A) True

(B) False

 (C) –

(D) –


5- In OOP, the access to private data is ??

(A) Compilation Error

(B) Restricted to methods of the same class

(C) Restricted to methods of other classes

(D) Available to the methods of the same class and other classes


6- Some fundamental changes are needed if one wants to add a derived class to a base class ??

(A) True

(B) False

(C) –

(D) –


7- The use of a break statement in a “Switch” statement is what ??

(A) optional

(B) not allowed

(C) compulsory

(D) sometimes gives error


8- When an exception is thrown then the additional information sent may be placed in??

(A) switch statement 

(B) for loop

(C) throw keyword

(D) catch block


9- The result of the expression –> 13 & 25 will be ?

(A) 25

(B) 27

(C) 18

(D) 9


10-  You must declare the data member in _____ section of the class to expose a data member to the program ??

(A) exposed

(B) public

(C) private 

(D) common




11- Which among these are the valid characters for a numeric literal constant ??

(A) dollar sign $

(B) percent sign %

(C) space

(D) None of these


12- Static data member is given a value ??

(A) within a class method 

(B) when the program is executed 

(C) Never

(D) outside the class definition


13- The function that changes the state of the cout object is known as ??

(A) adjuster

(B) modifier

(C) Manipulator

(D) member


14- The time when a variable comes into existence in memory, it is determined by ??

(A) Data type

(B) Scope

(C) Storage class

(D) All of the above


15- When the compiler cannot differentiate between two overloaded constructors then they are called ??

(A) Ambiguous

(B) Overloaded

(C) Destructed

(D) None of these


16- Some streams work with input and some work with output ??

(A) False

(B) True

(C) –

(D) –


17- If a class needs special initialization tasks, what will you want to design ??

(A) Initializer

(B) Compiler

(C) special method

(D) Constructor


18- Which of these statements does not occur in computer programs ??

(A) for

(B) continue

(C) loop

(D) denial


19- When the actual source code for implementing a template function is created ??

(A) when the definition of the function appears

(B) when the declaration of the function appears

(C) when the function is invoked

(D) None


20- A pure virtual function _____ ??

(A) is only defined in a derived class

(B) will be never called 

(C) has a complete body

(D) will only be called to delete the object




21- Extracting the relevant attributes of an object is known as what ??

(A) Abstraction

(B) Polymorphism

(C) Inheritance

(D) Databinding


22- The newline character is included between which of these ??

(A) control string

(B) pair of parentheses

(C) pair of curly braces

(D) &


23- What a programming language must allow being called Object-oriented language ??

(A) #include file

(B) functions that return a single value

(C) Both (a) and (b)

(D) Inheritance


24- What is/are the features that make C++ a powerful language ??

(A) Reusing old code

(B) Easy implementation

(C) OOP features

(D) All of the above


25- Through the friend function which of these functions can be overloaded ??

(A) =

(B) ( )

(C) *

(D) ->


26- What is that function called that returns no values to the program ??

(A) type barren

(B) type empty

(C) Both (a) and (b)

(D) type void


27- What keyword is used to define a structure ??

(A) structure

(B) struct

(C) str

(D) stru


28- When Exception handling is targeted ??

(A) At the run-time error

(B) Logical error

(C) Compiler error

(D) All of these


29- Where the keyword friend does not appear ??

(A) The private section of a class

(B) The class desiring access to another class

(C) The public section of a class

(D) The class allowing access to another class


30- Which among these is an extension of header files ??

(A) .hd

(B) .head


(D) .H


         Read More

Leave a Comment

Your email address will not be published. Required fields are marked *

error: Content is protected !!