Tech Mahindra Interview Question

String related question like reverse a string count the length