Object Oriented Programming MCQs

Page No. 29

The nested class can be declared ___________________


a Public

✖


bPrivate

✖


c Protected

✓


dPublic, Protected, Private or Package private

✖


View Answer Protected

Static nested classes doesn’t have access to _________________ from enclosing class.


aPrivate members

✖


bProtected members

✖


cPublic members

✖


d Any other members

✓


View Answer Any other members

Non-static nested classes have access to _____________ from enclosing class.


aPrivate members

✖


b Protected members

✖


cPublic members

✖


d All the members

✓


View Answer All the members

How many categories are nested classes divided into?


a2

✓


b3

✖


c4

✖


d5

✖


View Answer 2

Which feature of OOP reduces the use of nested classes?


aEncapsulation

✖


bInheritance

✓


cBinding

✖


dAbstraction

✖


View Answer Inheritance

Which among the following best describes a nested class?


aClass inside a class

✓


bClass inside a function

✖


cClass inside a package

✖


dClass inside a structure

✖


View Answer Class inside a class

Passing an object using copy constructor and pass by value are same.


aTrue

✖


bFalse

✓


cA & B

✖


dNone of these

✖


View Answer False

Is it possible that an object of is passed to a function, and the function also have an object of same name?


aNo, Duplicate declaration is not allowed

✓


bNo, 2 objects will be created

✖


cYes, Scopes are different

✖


d Yes, life span is different

✖



If an object is passed by address, will be constructor be called?


aYes, to allocate the memory

✖


bYes, to initialize the members

✖


c No, values are copied

✓


dNo, temporary object is created

✖



How many objects can be passed to a function simultaneously?


aOnly 1

✖


bOnly an array

✖


cOnly 1 or an array

✖


dAs many as required

✓


View Answer As many as required

Goto Page No.

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