Object Oriented Programming MCQs

Page No. 9

While using encapsulation, which among the following is possible?


aCode modification can be additional overhead


bData member’s data type can be changed without changing any other code


cData member’s type can’t be changed, or whole code have to be changed


dMember functions can be used to change the data type of data members



If data members are private, what can we do to access them from the class object?


aCreate public member functions to access those data members


bCreate private member functions to access those data members


cCreate protected member functions to access those data members


d Private data members can never be accessed from outside the class



Which among the following best describes encapsulation?


aIt is a way of combining various data members into a single unit


bIt is a way of combining various member functions into a single unit


cIt is a way of combining various data members and member functions into a single unit which can operate on any data


dIt is a way of combining various data members and member functions that operate on those data members into a single unit



Using higher degree of abstraction __________


aMay get unsafe


bMay reduce readability


cCan be safer


dCan increase vulnerability


View Answer Can be safer

Which among the following is not a level of abstraction?


aLogical level


bPhysical level


cView level


dExternal level


View Answer External level

A phone is made up of many components like motherboard, camera, sensors and etc. If the processor represents all the functioning of phone, display shows the display only, and the phone is represented as a whole. Which among the following have highest level of abstraction?


aMotherboard


bDisplay


cCamera


dPhone


View Answer Phone

If two classes combine some private data members and provides public member functions to access and manipulate those data members. Where is abstraction used?


aUsing private access specifier for data members


bUsing class concept with both data members and member functions


cUsing public member functions to access and manipulate the data members


dData is not sufficient to decide what is being used



In terms of stream and files ____________


aAbstraction is called a stream and device is called a file


bAbstraction is called a file and device is called a stream


cAbstraction can be called both file and stream


dAbstraction can’t be defined in terms of files and stream



Encapsulation and abstraction differ as ____________


aBinding and Hiding respectively


bHiding and Binding respectively


cCan be used any way


dHiding and hiding respectively



Higher the level of abstraction, higher are the details.


aTrue


bFalse


cA & B


d None of these


View Answer False

Goto Page No.

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