Pregunta de entrevista de Tata Consultancy Services

In oops they asked inheritance