C program to print the reverse of the string
This program implements the function strrev() to print the reverse of the string. Firstly, the program will ask the user to enter any string. Then it uses the strrev() function by passing the string entered by the user as a parameter. The function will return the reverse of the string .
Before moving on to the example you need to make sure that you have good knowledge and understanding of the following topics.
Now, look at the codes below written in C to learn about its implementation details.
puts("Enter a string: ");
printf("The output after doing the reverse of the string entered is: %s", s1);
The above code will display its output as below.
The output after doing the reverse of the string entered is: margorp