Synopsys Interview Question

write a function to reverse a string