Object Oriented Programming MCQs

Page No. 5

Which of the following is incorrect?


aclass student{ }s;


bclass student{ }; student s;


cclass student{ }s[];


dclass student{ }; student s[5];


View Answer class student{ }s[];

Which among the following is false?


aObject must be created before using members of a class


bMemory for an object is allocated only after its constructor is called


cObjects can’t be passed by reference


dObjects size depends on its class data members



How many objects can be declared of a specific class in a single program?


a32768


b127


c14


dAs many as you want


View Answer As many as you want

Which definition best describes an object?


aInstance of a class


bInstance of itself


cChild of a class


dOverview of a class


View Answer Instance of a class

Does OOP provide better security than POP?


aAlways true for any programming language


bMay not be true with respect to all programming languages


cIt depends on type of program


dIt’s vice-versa is true



Which among the following, for a pure OOP language, is true?


aThe language should follow 3 or more features of OOP


bThe language should follow at least 1 feature of OOP


cThe language must follow only 3 features of OOP


dThe language must follow all the rules of OOP



Exception handling is a feature of OOP.


aTrue


bFalse


cA & B


d None of these


View Answer True

Which among doesn’t illustrates polymorphism?


aFunction overloading


bFunction overriding


cOperator overloading


dVirtual function


View Answer Function overriding

Which feature in OOP is used to allocate additional function to a predefined operator in any language?


aOperator Overloading


bFunction Overloading


cOperator Overriding


dFunction Overriding


View Answer Operator Overloading

___________ underlines the feature of Polymorphism in a class.


aNested class


bEnclosing class


cInline function


dVirtual Function


View Answer Virtual Function

Goto Page No.

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