Problem Statement
In this program we will code a basic program to find reverse of
a string.
Code
#include
#include
void string_rev(char s[])
{
strrev(s);
printf("Reverse of the string : %s\n", s);
}
int main()
{
char s[1000];
printf("Enter
the string ?");
gets(s);
string_rev(s);
}
Output
Enter the string ? – codeofgeeks
Reverse of the string : skeegfoedoc


0 Comments