Object Oriented Programming MCQs

Page No. 58

Where in the parameter list is the implicit *this is added?


aRight most parameter

✖


b Anywhere in parameter list

✖


cLeft most parameter

✓


dNot added to parameter list

✖


View Answer Left most parameter

When the friend operator overloading is converted into member operator overloading _______________


aTwo parameters of friend function remains same parameters in member operator overloading

✖


bTwo parameters of friend function becomes only one parameter of member function

✓


cTwo parameters of friend function are removed while using member function

✖


dTwo parameters of friend function are made 4 in member operator overloading

✖



If left operand member is specified directly in the function definition, which is the correct implicit conversion of that syntax?


athis className

✖


b*this parameterObject

✖


c*this returnedObject

✖


d*this object

✓


View Answer *this object

Which object’s members can be called directly while overloading operator function is used (In function definition)?


aLeft operand members

✓


bRight operand members

✖


cAll operand members

✖


dNone of the members

✖


View Answer Left operand members

Why the left parameter is removed from parameter list?


aBecause it is of no use

✖


bBecause it is never used in definitions

✖


cBecause it becomes parameter pointed by *this

✓


dBecause it can’t be referred by *this pointer

✖



What is the syntax to overload an operator?


aclassName::operator(parameters)

✓


bclassName:operator(parameters)

✖


cclassName.operator(paramteres)

✖


dclassName->operator(parameters)

✖



If a friend overloaded operator have to be changed to member overloaded operator, which operator should be used with the class name?


aScope resolution operator

✓


bColon

✖


cArrow operator

✖


dDot operator

✖



If the left operand is pointed by *this pointer, what happens to other operands?


aOther operands are passed as function return type

✖


bOther operands are passed to compiler implicitly

✖


cOther operands must be passed using another member function

✖


dOther operands are passed as function arguments

✓



When the operator to be overloaded becomes the left operand member then ______________


aThe right operand acts as implicit object represented by *this

✖


bThe left operand acts as implicit object represented by *this

✓


cEither right or left operand acts as implicit object represented by *this

✖


d*this pointer is not applicable in that member function

✖



Which among the following is mandatory condition for operators overloading?


aOverloaded operator must be member function of the left operand

✓


bOverloaded operator must be member function of the right operand

✖


cOverloaded operator must be member function of either left or right operand

✖


dOverloaded operator must not be dependent on the operands

✖



Goto Page No.

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