Pregunta de entrevista de Wipro

Question based on the oops followed a coding question.