Pregunta de entrevista de Tata Consultancy Services

Oops and dbms concepts, 2 coding questions