1.

To group all the brands of cars, what should be used?(a) Class(b) Structure(c) Function(d) ObjectThis question was addressed to me in an interview.Question is taken from Class Use in chapter Classes of Object Oriented Programming

Answer»

The CORRECT choice is (a) Class

Easy explanation - A class can be used to GROUP all the BRANDS of cars. The Different brands may have different properties but all will have some common properties like number of wheels and doors, accessories etc. All of those properties can be grouped into a SINGLE class REPRESENTING all the cars.



Discussion

No Comment Found

Related InterviewSolutions