Object Oriented Programming MCQs

Page No. 60

When is the memory allocated for an object?


aAt declaration of object


bAt compile time


cWhen object constructor is called


dWhen object is initialized to another object



Where is the memory allocated for the objects?


a HDD


bCache


cRAM


dROM


View Answer RAM

What does memory allocation for objects mean?


aActual creation and memory allocation for object members


bCreation of member functions


cCreation of data members for a class


dActual creation and data declaration for object members



Which feature of OOP is exhibited by the function overriding?


aInheritance


bAbstraction


cPolymorphism


dEncapsulation


View Answer Polymorphism

If virtual functions are defined in the base class then _______________


aIt is not necessary for derived classes to override those functions


bIt is necessary for derived classes to override those functions


cThose functions can never be derived


dThose functions must be overridden by all the derived classes



Abstract functions of a base class _________________


aAre overridden by the definition in same class


bAre overridden by the definition in parent class


cAre not overridden generally


dAre overridden by the definition in derived class



In Kotlin, the function to be overridden must be ______________


aPrivate


bOpen


cClosed


dAbstract


View Answer Open

What should be used to call the base class method from the derived class if function overriding is used in Java?


aKeyword super


bScope resolution


cDot operator


dFunction name in parenthesis


View Answer Keyword super

In Delphi ______________


aMethod overriding is done implicitly


bMethod overriding is not supported


cMethod overriding is done with directive override


dMethod overriding is done with the directive virtually



In C# ____________________


aNon – virtual or static methods can’t be overridden


bNon – virtual and static methods only can be overridden


cOverriding is not allowed


dOverriding must be implemented using C++ code only



Goto Page No.

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