Object Oriented Programming MCQs

Page No. 45

Which type of inheritance cannot involve private inheritance?


aSingle level

✖


bMultipe

✖


cHybrid

✖


dAll types can have private inheritance

✓



In hierarchical inheritance, all the classes involve some kind of inheritance.


a True

✖


bFalse

✓


cA & B

✖


dNone of these

✖


View Answer False

If class A has two nested classes B and C. Class D has one nested class E, and have inherited class A. If E inherits B and C, then ________________


a It shows multiple inheritance

✖


bIt shows hierarchical inheritance

✖


cIt shows multiple inheritance

✖


dMultiple inheritance among nested classes, and single level for enclosing classes

✓



Which among the following is false?


a If one class inherits the inherited class in single level inheritance, it is multi-level inheritance

✖


b Hybrid inheritance always contains multiple inheritance

✓


cHierarchical inheritance involves inheriting same class into more than one classes

✖


dHybrid inheritance can involve any types of inheritance together

✖



Which among the following is correct for the following code?


a Multi-level inheritance is used, with nested classes

✖


bMultiple inheritance is used, with nested classes

✓


cSingle level inheritance is used, with enclosing classes

✖


dSingle level inheritance is used, with both enclosing and nested classes

✖



If 6 classes uses single level inheritance with pair classes (3 pairs), which inheritance will this be called?


aSingle

✓


bMultiple

✖


cHierarchical

✖


dMultilevel

✖


View Answer Single

Which type of inheritance results in the diamond problem?


a Single level

✖


bHybrid

✓


cHierarchical

✖


dMultilevel

✖


View Answer Hybrid

How many types of inheritance can be used at a time in a single program?


aAny two types

✖


bAny three types

✖


c Any 4 types

✖


dAny type, any number of times

✓



Which among the following best describes multiple inheritance?


aTwo classes being parent of any other classes

✖


bThree classes being parent of other classes

✖


cMore than one class being parent of other child classes

✖


dMore than one class being parent of single child

✓



Which type of inheritance is illustrated by the following code?


aSingle level

✖


bMultilevel and single level

✖


cHierarchical

✖


d Hierarchical and single level

✓



Goto Page No.

Page 45 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