Pregunta de entrevista de Tata Consultancy Services

Few inheritance programming question