Tech Mahindra Interview Question

String and array question and basics