Object Oriented Programming MCQs

Page No. 3

Class with main() function can be inherited.


aTrue


bFalse


cA & B


d None of the above


View Answer True

What is the scope of a class nested inside another class?


aProtected scope


bPrivate scope


cGlobal scope


dDepends on access specifier and inheritance used



Which of the following describes a friend class?


aFriend class can access all the private members of the class, of which it is a friend


bFriend class can only access protected members of the class, of which it is a friend


cFriend class don’t have any implementation


dFriend class can’t access any data member of another class but can use it’s methods



Which class can have member functions without their implementation?


a Default class


bString class


cTemplate class


d Abstract class


View Answer Abstract class

Size of a class is _____________


aSum of the size of all the variables declared inside the class


bSum of the size of all the variables along with inherited variables in the class


cSize of the largest size of variable


dClasses doesn’t have any size



Which is known as a generic class?


a Abstract class


b Final class


cTemplate class


dEfficient Code


View Answer Template class

Which is most appropriate comment on following class definition?


aError : same variable name can’t be used twice


bError : Public must come first


cError : data types are different for same variable


dIt is correct



What is default access specifier for data members or member functions declared within a class without any specifier, in C++?


aPrivate


bProtected


c Public


dDepends on compiler


View Answer Private

Class is pass by _______


a Value


bReference


cValue or Reference, depending on program


dCopy


View Answer Reference

Which of the following is not type of class?


aAbstract Class


bFinal Class


cStart Class


dString Class


View Answer Start Class

Goto Page No.

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