Object Oriented Programming MCQs

Page No. 56

Which among the following best defines the abstract methods?


aFunctions declared and defined in base class


bFunctions only declared in base class


cFunction which may or may not be defined in base class


dFunction which must be declared in derived class



Which keyword is used to define the inline member function?


ano keyword required


binline


cinlined


dline


View Answer inline

Which keyword is used to define the static member functions?


astatic


bstop


copen


dstate


View Answer static

Which among the following is true?


aMember functions can never be private


bMember functions can never be protected


cMember functions can never be public


dMember functions can be defined in any access specifier



All type of member functions can’t be used inside a single class.


a True


bFalse


cA & B


d None of these


View Answer False

Member functions _____________________


aMust be defined inside class body


bCan be defined inside class body or outside


cMust be defined outside the class body


dCan be defined in another class



Which keyword is used to make a nonmember function as friend function of a class?


afriendly


bnew


cfriend


dconnect


View Answer friend

What is the syntax of a const member function?


avoid fun( ) const { }


b void fun( ) constant { }


cvoid const fun() { }


d const void fun( ){ }


View Answer void fun( ) const { }

What are friend member functions (C++)?


aMember function which can access all the members of a class


bMember function which can modify any data of a class


cMember function which doesn’t have access to private members


dNon-member functions which have access to all the members (including private) of a class



Which among the following best describes the inline member functions?


aFunctions defined inside the class only


bFunctions with keyword inline only


cFunctions defined outside the class


dFunctions defined inside the class or with the keyword inline



Goto Page No.

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