Object Oriented Programming MCQs

Page No. 54

Virtual functions can’t be made friend function of other classes.


aTrue


bFalse


cA & B


d None of the above


View Answer True

Virtual functions can never be made _______________


aStatic function


bParameterized function


cDefault argument function


dZero parameter function


View Answer Static function

In which access specifier should a virtual function be defined?


aPrivate


b Public


cProtected


dDefault


View Answer Public

The resolving of virtual functions is done at ______________


aCompile time


bInterpret time


cRuntime


d Writing source code


View Answer Runtime

Where the virtual function should be defined?


aTwice in base class


bDerived class


cBase class and derived class


dBase class


View Answer Base class

Which keyword is used to declare virtual functions?


avirtual


bvirt


canonymous


dvirtually


View Answer virtual

Virtual functions are mainly used to achieve _____________


aCompile time polymorphism


b Interpreter polymorphism


cRuntime polymorphism


d Functions code polymorphism


View Answer Runtime polymorphism

What does a virtual function ensure for an object, among the following?


aCorrect method is called, regardless of the class defining it


bCorrect method is called, regardless of the object being called


c Correct method is called, regardless of the type of reference used for function call


dCorrect method is called, regardless of the type of function being called by objects



Virtual function is ______ class function which expected to be redefined in ______ class, so that when reference is made to derived class object using pointer then we can call virtual function to execute ________ class definition version.


aBase, derived, derived


bDerived, Derived, Derived


cBase, derived, base


dBase, base, derived



The abstract method definition can be made ___________ in derived class.


aPrivate


bProtected


cPublic


dPrivate, public, or protected



Goto Page No.

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