Capgemini interview question

Logical programs related to String and Array