Object Oriented Programming MCQs

Page No. 47

If single level inheritance is used and an abstract class is created with some undefined functions, can its derived class also skip some definitions?


aYes, always possible

✖


b Yes, possible if only one undefined function

✖


cNo, at least 2 undefined functions must be there

✖


dNo, the derived class must implement those methods

✓



Which method in the code below is single level inherited?


aClass A

✖


bClass B

✓


cClass C

✖


d None

✖


View Answer Class B

Single level inheritance supports _____________ inheritance.


a Runtime

✓


bCompile time

✖


c Multiple inheritance

✖


dLanguage independency

✖


View Answer Runtime

If single inheritance is used, program will contain ________________


aAt least 2 classes

✓


bAt most 2 classes

✖


c Exactly 2 classes

✖


dAt most 4 classes

✖


View Answer At least 2 classes

If class A and class B are derived from class C and class D, then ________________


a Those are 2 pairs of single inheritance

✓


bThat is multilevel inheritance

✖


cThose is enclosing class

✖


d Those are all independent classes

✖



Which among the following defines single level inheritance?


aOne base class derives another class

✖


b One derived class inherits from one base class

✓


cOne base class inherits from one derived class

✖


d One derived class derives from another derived class

✖



Is it compulsory for all the classes in multilevel inheritance to have constructors defined explicitly if only last derived class object is created?


a Yes, always

✖


b Yes, to initialize the members

✖


cNo, it not necessary

✓


dNo, Constructor must not be defined

✖


View Answer No, it not necessary

Does following code show multiple inheritance?


aYes, class C and class D

✖


bYes, All together it’s multilevel

✖


cNo, 4 classes are used

✖


dNo, multiple inheritance is used with class A, B and C

✓



in multilevel inheritance, which is the most significant feature of OOP used?


a Code readability

✖


bFlexibility

✖


cCode reusability

✓


d Code efficiency

✖


View Answer Code reusability

If all the classes used parameterized constructors and no default constructor then ___________


a The object of lower level classes can’t be created

✖


bObject of lower level classes must call parent class constructors explicitly

✓


cObject of lower level classes must define all the default constructors

✖


d) Only object of first class can be created, which is first parent

✖



Goto Page No.

Page 47 of 93

Alphabetical MCQs Categories
—

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"
—

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan