Object Oriented Programming MCQs

Page No. 77

If pointer to an object is declared __________


aIt can store any type of address

✖


bIt can store only void addresses

✖


cIt can only store address of integer type

✖


d It can only store object address of class type specified

✓



How does compiler decide the intended object to be used, if more than one object are used?


aUsing object name

✖


bUsing an integer pointer

✖


c Using this pointer

✓


dUsing void pointer

✖


View Answer Using this pointer

Which operator should be used to access the members of the class using object pointer?


aDot operator

✖


bColon to the member

✖


cScope resolution operator

✖


d Arrow operator

✓


View Answer Arrow operator

Which is correct syntax for declaring pointer to object?


aclassName* objectName;

✓


b className objectName;

✖


c*className objectName;

✖


d className objectName();

✖



Which language among the following doesn’t allow pointers?


aC++

✖


bJava

✓


cPascal

✖


dC

✖


View Answer Java

Which is the correct syntax for declaring the type of this in a member function?


aclassType [cv-qualifier-list] *const this;

✖


bclassType const[cv-qualifier-list] *this;

✖


c[cv-qualifier-list]*const classType this;

✖


d[cv-qualifier-list] classType *const this;

✓



Which among the following is/are type(s) of this pointer?


a const

✖


bvolatile

✖


cconst or volatile

✓


dint

✖


View Answer const or volatile

This pointer can be used directly to ___________


aTo manipulate self-referential data structures

✓


bTo manipulate any reference to pointers to member functions

✖


cTo manipulate class references

✖


dTo manipulate and disable any use of pointers

✖



Earlier implementations of C++ ___________________


aever allowed assignment to this pointer

✖


bAllowed no assignment to this pointer

✖


cAllowed assignments to this pointer

✓


dNever allowed assignment to any pointer

✖



The this pointers _____________________


aAre modifiable

✖


bCan be assigned any value

✖


cAre made variables

✖


d Are non-modifiable

✓


View Answer Are non-modifiable

Goto Page No.

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