-Here we try to reverse the string and store in another string.
Example-
string is "HEY"
reverse is :"YEH"
program-
#include< iostream.h>
#include< string.h>
int main()
{
char s[20],s1[20];
int i=0,len=0;
//input of string
cout<<"Enter string"<
while(s[i++]!='')
len++;
i=0;
while(s[i]!='')
{
s1[i]=s[len-i-1];
i++;
}
s1[i]='';
cout<<"String in reverse order is: "<
Enter string
Mystring
String in reverse order is: gnirtsyM