Pergunta de entrevista da empresa Persistent Systems

Coding questions - if-else statement, Array, string etc.