Tech Mahindra interview question

Oops concepts Some program About exp How to reverse a string