HealthAsyst interview question

2. Program to reverse a string without strrev() function. Please note you have to write this efficiently like reducing the number of variables and for loops.