Object Oriented Programming MCQs

Page No. 88

Does java contain auto or register keywords?


aYes, for declaring every type of variable


b Yes, only to declare cache registers


cNo, because java doesn’t support automatic variables


dNo, java supports local variable concept



Constructor of automatic variables is called ____________________


aWhen execution reaches the place of declaration of automatic variables


bWhen the program is compiled


cWhen the execution is just started


dJust before the execution of the program



What values does uninitialized automatic variables contain?


aNull value


bVoid value


cUndefined/Garbage


dZero value


View Answer Undefined/Garbage

All variables declared within a block ____________________


aAre not always automatic


bCan be made non-automatic


cAre static by default


dAre automatic by default



The static variables of a function ________________


aAre also automatic variables


b Are not automatic variables


cAre made automatic by default


dCan be made automatic explicitly



Where are the automatic variables stored if another function is called in between the execution of the program?


aHeap


bQueue


cStack


dTemp variable


View Answer Stack

If an automatic variable is created and then a function is called then ________________


aThe automatic variable created gets destroyed


bThe automatic variable doesn’t get destroyed


cThe automatic variable may or may not get destroyed


dThe automatic variable can’t be used in this case



Which among the following is true for automatic variables in general?


aAutomatic variables are invisible to called function


b Automatic variables are always visible to the called function


cAutomatic variables can’t interact with the called function


dAutomatic variables can’t be variable



Scope of an automatic variable _______________


aIs actually the whole program


bIs actually never fixed


cIs always equal to the whole program execution


d Is actually function or block in which it is defined



The memory for automatic variables ___________________


aHave to be allocated and deallocated explicitly


bAre allocated and deallocated automatically


c Is never actually allocated


dAre never safe



Goto Page No.

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