Object Oriented Programming MCQs

Page No. 33

From which index does the array of objects start?


a0


b1


c2


d3


View Answer 0

Can we have two dimensional object array?


aYes, always


bYes, only if primitive type array


cNo, since two indices are impossible


dNo, never


View Answer Yes, always

If an array of objects is of size 10 and a data value have to be retrieved from 5th object then ________________ syntax should be used.


aArray_Name[4].data_variable_name;


bData_Type Array_Name[4].data_variable_name;


c Array_Name[4].data_variable_name.value;


d Array_Name[4].data_variable_name(value);



The Object array is created in _____________________


aHeap memory


bStack memory


cHDD


dROM


View Answer Heap memory

The objects in an object array _______________________


aCan be created without use of constructor


bCan be created without calling default constructor


c Can’t be created with use of constructor


dCan’t be created without calling default constructor



How the objects of array can be denoted?


aIndices


bName


cRandom numbers


d Alphabets


View Answer Indices

If constructor arguments are passed to objects of array then ____________ if the constructors are overloaded.


aIt is mandatory to pass same number of arguments to all the objects


bIt is mandatory to pass same type of arguments to all the objects


cIt is not mandatory to call same constructor for all the objects


dIt is mandatory to call same constructor for all the constructors



When are the array of objects without any initialization useful?


aWhen object data is not required just after the declaration


bWhen initialization of object data is to be made by the compiler


cWhen object data doesn’t matter in the program


dWhen the object should contain garbage data



Which is the condition that must be followed if the array of objects is declared without initialization, only with size of array?


aThe class should have separate constructor for each object


bThe class must have no constructors


cThe class should not have any member function


d The class must have a default or zero argument constructor



If array of objects is declared as given below, which is the limitation on objects?


aThe objects will have same values


b The objects will not be initialized individually


cThe objects can never be initialized


d The objects will have same data



Goto Page No.

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