Home >>C String functions >C strrev() function

C strrev() function

C strrev() function

C strrev() function is used to reverse the given string.

Syntax:
Strrev(str)

Note:- Here str is given string.

Parameters:-

It takes string as parameter

Return type:-

It returns modified string.

Example-1

#include <stdio.h>
#include <string.h>
int main()
{
   char name[30] = "raman";
   printf("String after reverse: %s",strrev(name));
   return 0;
}

Output:
string after reverse: namar

No Sidebar ads