Object Oriented Programming MCQs

Page No. 87

Delete operator _________________


aCan be used on pointers with null value


b Can be used on pointers with void value


cCan be used on pointer with value 0


dCan be used on pointer with any value



If delete is used to delete an object which was not allocated using new _______________


a Then out of memory error arises


bThen unreachable code error arises


cThen unpredictable errors may arise


dThen undefined variable error arises



Which type of value has resulted from the delete operator?


avoid


b void pointer


cnull pointer


dnull


View Answer void

Does delete return any value?


aYes, positive value


bYes, negative value


cYes, zero value


d No


View Answer No

If an object is allocated using new operator ____________


at should be deleted using delete operator


bIt can’t be deleted using delete operator


cIt may or may not be deleted using delete operator


dThe delete operator is not applicable



What is a delete operator?


aDeallocates a block of memory


bDeallocates whole program memory


c Deallocates only primitive data memory


d Deallocates all the data reserved for a class



How are automatic variables different from the instance variables?


aAutomatic variables are initialized automatically but instances are not


bAutomatic variables are given zero values initially and not instances


cInstance variables have to be initialized explicitly and automatic implicitly


dInstance variables are initialized implicitly while automatic are not



In Perl, using which operator are the local variables created?


aDot


bArrow


cScope resolution


dmy


View Answer my

Which error is produced if the automatic variables are used without declaration?


a Undefined symbol


bMemory error


cType mismatch


dStatement missing


View Answer Undefined symbol

The automatic variables _________________________


aMust be declared after its use


bMust be declared before using


cMust be declared, can be anytime


dMust not be initialized



Goto Page No.

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