Pregunta de entrevista de Virtusa

Some basic programming question and it's explanation