Pregunta de entrevista de Altair Semiconductor

Some coding questions. Which was Ok