A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

51. 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
View Answer Report Discuss Too Difficult!
Answer: (c).It is not mandatory to call same constructor for all the objects

52. How the objects of array can be denoted?
a. Indices
b. Name
c. Random numbers
d. Alphabets
View Answer Report Discuss Too Difficult!
Answer: (a).Indices

53. 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
View Answer Report Discuss Too Difficult!
Answer: (b).Can be created without calling default constructor

54. The Object array is created in _____________________
a. Heap memory
b. Stack memory
c. HDD
d. ROM
View Answer Report Discuss Too Difficult!
Answer: (a).Heap memory

55. 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);
View Answer Report Discuss Too Difficult!
Answer: (a).Array_Name[4].data_variable_name;

56. 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
View Answer Report Discuss Too Difficult!
Answer: (a).Yes, always

57. From which index does the array of objects start?
a. 0
b. 1
c. 2
d. 3
View Answer Report Discuss Too Difficult!
Answer: (a).0

58. Two dimensional array can’t be initialized with the declaration.
a. True
b. False
c. May be
d. Can't say
View Answer Report Discuss Too Difficult!
Answer: (b).False

59. 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
View Answer Report Discuss Too Difficult!
Answer: (d).No, never

60. Which among the following is main use of object?
a. To create instance of a function
b. To create instance of a program
c. To create instance of class
d. To create instance of structures
View Answer Report Discuss Too Difficult!
Answer: (c).To create instance of class

Page 6 of 15