1.

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 dataThis question was posed to me during an interview.The above asked question is from Object Array topic in division Object of Object Oriented Programming

Answer»

Right choice is (C) All the OBJECTS should be of same CLASS

To explain: The objects of an array must be of same class. This is mandatory because array is set of same type of elements. The objects of same class are considered to be of same type.



Discussion

No Comment Found

Related InterviewSolutions