Cranes at VIIT Q13

Reverse a String Without Modifying the Original

Write a C program that takes a string as input from the user and stores its reverse in a separate character array. Do not modify the original string.

Requirements:

Example Input & Output:

Enter a string: hello
Reversed string: olleh
            

Hint: Use a loop to find the length of the string, and then copy characters from the end of the original to the beginning of the new array.

Task: Implement this logic using only basic character array operations in C.