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.

41. The memory allocated for an object ____________________
a. Can be only dynamic
b. Can be only static
c. Can be static or dynamic
d. Can’t be done using dynamic functions
View Answer Report Discuss Too Difficult!
Answer: (c).Can be static or dynamic

42. If an object is declared in a user defined function __________________
a. Its memory is allocated in stack
b. Its memory is allocated in heap
c. Its memory is allocated in HDD
d. Its memory is allocated in cache
View Answer Report Discuss Too Difficult!
Answer: (a).Its memory is allocated in stack

43. In java, ____________________ takes care of managing memory for objects dynamically.
a. Free collector
b. Dust collector
c. Memory manager
d. Garbage collector
View Answer Report Discuss Too Difficult!
Answer: (d).Garbage collector

44. Which operator can be used to free the memory allocated for an object in C++?
a. Free()
b. delete
c. Unallocate
d. Collect
View Answer Report Discuss Too Difficult!
Answer: (b).delete

45. What is 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
View Answer Report Discuss Too Difficult!
Answer: (a).An array of instances of class represented by single name

46. 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
View Answer Report Discuss Too Difficult!
Answer: (c).All the objects should be of same class

47. What is the type of the elements of array of objects?
a. Class
b. Void
c. String
d. Null
View Answer Report Discuss Too Difficult!
Answer: (a).Class

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

Class_name arrayName[size];
a. The objects will have same values
b. The objects will not be initialized individually
c. The objects can never be initialized
d. The objects will have same data
View Answer Report Discuss Too Difficult!
Answer: (b).The objects will not be initialized individually

49. 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
View Answer Report Discuss Too Difficult!
Answer: (d).The class must have a default or zero argument constructor

50. 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
View Answer Report Discuss Too Difficult!
Answer: (a).When object data is not required just after the declaration

Page 5 of 15