Explore topic-wise MCQs in Object Oriented Programming.

This section includes 20 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

Is an array of characters always a string?

A. Yes, always
B. Yes, if each character is terminated by null
C. No, since each character is terminated by null
D. No, never
Answer» E.
2.

Two dimensional array can’t be initialized with the declaration.

A. True
B. False
Answer» C.
3.

From which index does the array of objects start?

A. 0
B. 1
C. 2
D. 3
Answer» B. 1
4.

Can we have two dimensional object array?

A. Yes, always
B. Yes, only if primitive type array
C. No, since two indices are impossible
D. No, never
Answer» B. Yes, only if primitive type array
5.

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.

A. Array_Name[4].data_variable_name;
B. Data_Type Array_Name[4].data_variable_name;
C. Array_Name[4].data_variable_name.value;
D. Array_Name[4].data_variable_name(valu
E. ;
Answer» B. Data_Type Array_Name[4].data_variable_name;
6.

The Object array is created in _____________________

A. Heap memory
B. Stack memory
C. HDD
D. ROM
Answer» B. Stack memory
7.

The objects in an object array _______________________

A. Can be created without use of constructor
B. Can be created without calling default constructor
C. Can’t be created with use of constructor
D. Can’t be created without calling default constructor
Answer» C. Can’t be created with use of constructor
8.

How the objects of array can be denoted?

A. Indices
B. Name
C. Random numbers
D. Alphabets
Answer» B. Name
9.

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

A. It is mandatory to pass same number of arguments to all the objects
B. It is mandatory to pass same type of arguments to all the objects
C. It is not mandatory to call same constructor for all the objects
D. It is mandatory to call same constructor for all the constructors
Answer» D. It is mandatory to call same constructor for all the constructors
10.

When are the array of objects without any initialization useful?

A. When object data is not required just after the declaration
B. When initialization of object data is to be made by the compiler
C. When object data doesn’t matter in the program
D. When the object should contain garbage data
Answer» B. When initialization of object data is to be made by the compiler
11.

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

A. The class should have separate constructor for each object
B. The class must have no constructors
C. The class should not have any member function
D. The class must have a default or zero argument constructor
Answer» E.
12.

What is the type of elements of array of objects?

A. Class
B. Void
C. String
D. Null
Answer» B. Void
13.

Which among the following is a mandatory condition for array of objects?

A. All the objects should be of different class
B. All the objects should be of same program classes
C. All the objects should be of same class
D. All the objects should have different data
Answer» D. All the objects should have different data
14.

What is an array of objects?

A. An array of instances of class represented by single name
B. An array of instances of class represented by more than one name
C. An array of instances which have more than 2 instances
D. An array of instances which have different types
Answer» B. An array of instances of class represented by more than one name
15.

THE_OBJECT_ARRAY_IS_CREATED_IN______________________?$

A. Heap memory
B. Stack memory
C. HDD
D. ROM
Answer» B. Stack memory
16.

THE_OBJECTS_IN_AN_OBJECT_ARRAY________________________?$

A. Can be created without use of constructor
B. Can be created without calling default constructor
C. Can’t be created with use of constructor
D. Can’t be created without calling default constructor
Answer» C. Can‚Äö√Ñ√∂‚àö√ë‚àö¬•t be created with use of constructor
17.

Can we have two dimensional object array?$

A. Yes, always
B. Yes, only if primitive type array
C. No, since two indices are impossible
D. No, never
Answer» B. Yes, only if primitive type array
18.

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.$

A. Array_Name[4].data_variable_name;
B. Data_Type Array_Name[4].data_variable_name;
C. Array_Name[4].data_variable_name.value;
D. Array_Name[4].data_variable_name(value);
Answer» B. Data_Type Array_Name[4].data_variable_name;
19.

Two dimensional array can’t be initialized with the declaration.$

A. True
B. False
Answer» C.
20.

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

A.
B. The objects will have same values
C. The objects will not be initialized individually
Answer» C. The objects will not be initialized individually