Object Oriented Programming MCQs

Page No. 61

Which language doesn’t support the method overriding implicitly?


aC++

✖


bC#

✓


cJava

✖


dSmallTalk

✖


View Answer C#

The functions to be overridden _____________


a Must be private in base class

✖


bMust not be private base class

✓


cMust be private in both derived and base class

✖


dMust not be private in both derived and base class

✖



How to access the overridden method of base class from the derived class?


aUsing arrow operator

✖


bUsing dot operator

✖


cUsing scope resolution operator

✓


dCan’t be accessed once overridden

✖



Which among function will be overridden from the function defined in derived class below:


ashow( )

✓


bprint( )

✖


cshow( ) and print( )

✖


dCompile time error

✖


View Answer show( )

Exactly same declaration in base and derived class includes______________


aOnly same name

✖


bOnly same return type and name

✖


cOnly same return type and argument list

✖


dAll the same return type, name and parameter list

✓



Which is the correct condition for function overriding?


aThe declaration must not be same in base and derived class

✖


bThe declaration must be exactly the same in base and derived class

✓


cThe declaration should have at least 1 same argument in declaration of base and derived class

✖


dThe declaration should have at least 1 different argument in declaration of base and derived class

✖



Which among the following is true?


aInheritance must not be using when overriding is used

✖


bOverriding can be implemented without using inheritance

✖


cInheritance must be done, to use overriding are overridden

✓


dInheritance is mandatory only if more than one functions

✖



Which among the following best describes member function overriding?


aMember functions having same name in base and derived classes

✓


bMember functions having same name in base class only

✖


cMember functions having same name in derived class only

✖


dMember functions having same name and different signature inside main function

✖



Use of const member function in a program _________________________


aIs mandatory, always

✖


bIs optional, always

✓


cIs mandatory, if objects are used

✖


dIs optional, if const objects are used

✖


View Answer Is optional, always

Which among the following is recommended for const functions?


aConst function use should be reduced in a program

✖


bConst function use should be more in a program

✓


cConst function use should not matter in a program

✖


dConst function use should be able to modify the values

✖



Goto Page No.

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