Aim:-Write
a program to read a string and write it in reverse order. (Using only string
length function “strlen”)
Source Code:-
#include <stdio.h>
#include <string.h>
int main()
{
char arr[100];
printf("Enter a string to
reverse\n");
gets(arr);
strrev(arr);
printf("Reverse of the string is
\n%s\n", arr);
return 0;
}
Output
0 Comments
How did you like it, please comment by posting my post