100+ Object Oriented Programming MCQ with Answers Pdf - 1

Question: 1

Procedural cohesion is similar to sequential cohesion, except that with procedural cohesion

(A) the tasks do not share data

(B) the tasks share data

(C) the tasks are simpler

(D) the tasks are not done in order

Ans: A

the tasks do not share data

Question: 2

The return type you code for all constructors is

(A) the same type as the first data member defined in the class

(B) void

(C) no type

(D) the class type

Ans: A

the same type as the first data member defined in the class

Question: 3

A pattern for creating an object is called an

(A) private

(B) public

(C) attributes

(D) class

Ans: D

class

Question: 4

Any exception specification appears in

(A) the header of a function that throws an exception

(B) a try block

(C) a catch block

(D) the main() program

Ans: A

the header of a function that throws an exception

Question: 5

A constructor initialisation list is preceded by

(A) a space

(B) a semicolon

(C) a colon

(D) two colons

Ans: C

a colon

Related Questions
Read More Engineering Topics