Object Oriented Programming MCQs

Page No. 13

It’s necessary to pass object by reference in copy constructor because ____________


aConstructor is not called in pass by reference

✓


bConstructor is called in pass by reference only

✖


cIt passes the address of new constructor to be created

✖


dIt passes the address of new object to be created

✖



Which constructor is called while assigning some object with another?


aDefault

✖


bParameterized

✖


cCopy

✓


dDirect assignment is used

✖


View Answer Copy

How many types of constructors are available, in general, in any language?


a2

✖


b3

✓


c4

✖


d5

✖


View Answer 3

Copy constructors are overloaded constructors.


aTrue

✓


bFalse

✖


cA & B

✖


d None of the above

✖


View Answer True

The arguments to a copy constructor _____________


aMust be const

✓


bMust not be cosnt

✖


cMust be integer type

✖


dMust be static

✖


View Answer Must be const

Can a copy constructor be made private?


aYes, always

✓


bYes, if no other constructor is defined

✖


cNo, never

✖


d No, private members can’t be accessed

✖


View Answer Yes, always

The deep copy is possible only with the help of __________


aImplicit copy constructor

✖


b User defined copy constructor

✓


cParameterized constructor

✖


dDefault constructor

✖



Copy constructor will be called whenever the compiler __________


aGenerates implicit code

✖


bGenerates member function calls

✖


c Generates temporary object

✓


dGenerates object operations

✖



Out of memory error is given when the object _____________ to the copy constructor.


aIs passed with & symbol

✖


bIs passed by reference

✖


cIs passed as

✖


dIs not passed by reference

✓



Object being passed to a copy constructor ___________


aMust be passed by reference

✓


b Must be passed by value

✖


cMust be passed with integer type

✖


dMust not be mentioned in parameter list

✖



Goto Page No.

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