Object Oriented Programming MCQs

Page No. 57

What are const member functions?


aFunctions in which none of the data members can be changed in a program

✖


bFunctions in which only static members can be changed

✖


cFunctions which treat all the data members as constant and doesn’t allow changes

✓


dFunctions which can change only the static members

✖



Correct syntax to access the static member functions from the main() function is ______________


aclassObject::functionName( );

✖


bclassName::functionName( );

✓


cclassName:classObject:functionName( );

✖


dclassName.classObject:functionName();

✖



How can static member function can be accessed directly in main( ) function?


aDot operator

✖


bColon

✖


cScope resolution operator

✓


dArrow operator

✖



What are static member functions?


aFunctions which use only static data member but can’t be accessed directly

✖


bFunctions which uses static and other data members

✖


cFunctions which can be accessed outside the class with the data members

✖


dunctions using only static data and can be accessed directly in main() function

✓



Simple member functions are ______________________


aOnes defined simply without any type

✓


bOnes defined with keyword simple

✖


cOnes that are implicitly provided

✖


d Ones which are defined in all the classes

✖



How many types of member functions are possible in general?


a 2

✖


b 3

✖


c4

✖


d5

✓


View Answer 5

Which operator among the following must be overloaded using the friend function?


a<< operator only

✖


b>> operator only

✖


cBoth << and >> operators

✓


dIt’s not mandatory to use friend function in any case

✖



All the operators can be overloaded using the member function operator overloading.


aTrue

✖


bFalse

✓


cA & B

✖


dNone of These

✖


View Answer False

Which operator among the following can be overloaded using both friend function and member function?


aAssignment operator

✖


bSubscript

✖


cMember selection (arrow operator)

✖


dModulus operator

✓


View Answer Modulus operator

Which operator among the following can be overloading using only member function?


aAssignment operator

✓


bAddition operator

✖


cSubtraction operator

✖


dMultiplication and division operator

✖


View Answer Assignment operator

Goto Page No.

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