Object Oriented Programming MCQs

Page No. 43

To group all the brands of cars, what should be used?


a Class


b Structure


cFunction


dObject


View Answer Class

Which among the following is the main characteristic of class?


aInheritance


bEncapsulation


cPolymorphism


dObject creation


View Answer Encapsulation

How can you make the private members inheritable?


aBy making their visibility mode as public only


bBy making their visibility mode as protected only


cBy making their visibility mode as private in derived class


dIt can be done both by making the visibility mode public or protected



The private members of the base class are visible in derived class but are not accessible directly.


aTrue


bFalse


cA & B


dNone of these


View Answer True

If a derived class object is created, which constructor is called first?


aBase class constructor


b Derived class constructor


c Depends on how we call the object


d Not possible



While inheriting a class, if no access mode is specified, then which among the following is true? (in C++)


aIt gets inherited publicly by default


bIt gets inherited protected by default


cIt gets inherited privately by default


d It is not possible



Members which are not intended to be inherited are declared as ________________


aPublic members


bProtected members


cPrivate members


dPrivate or Protected members]


View Answer Private members

If a base class is inherited in protected access mode then which among the following is true?


aPublic and Protected members of base class becomes protected members of derived class


bOnly protected members become protected members of derived class


cPrivate, Protected and Public all members of base, become private of derived class


dOnly private members of base, become private of derived class



Which access type data gets derived as private member in derived class?


aPrivate


bPublic


c Protected


dProtected and Private


View Answer Private

Which type of inheritance leads to diamond problem?


aSingle level


bMulti-level


cMultiple


dHierarchical


View Answer Multiple

Goto Page No.

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