The strrev(string) function returns reverse of the given string. Let's see a simple example of strrev() function.
#include#include int main(){ char str[20]; printf("Enter string: "); gets(str);//reads string from console printf("String is: %s",str); printf("\nReverse String is: %s",strrev(str)); return 0; }
Output: