1.

If a function can perform more than 1 type of tasks, where the function name remains same, which feature of OOP is used here?(a) Encapsulation(b) Inheritance(c) Polymorphism(d) AbstractionThis question was addressed to me during an interview for a job.My question is from OOPs Features topic in section OOPs Concept & Features of Object Oriented Programming

Answer»

The correct option is (c) Polymorphism

Easy explanation - For the feature given above, the OOP feature used is Polymorphism. EXAMPLE of polymorphism in REAL life is a kid, who can be a student, a SON, a BROTHER depending on where he is.



Discussion

No Comment Found

Related InterviewSolutions