Code is crash unexpectedly, any logical error in this code?
Purpose of this code is to reverse the string.
When I try to debug the code, the issue seems in the