#include<stdio.h>
main()
{
char ch[20],temp;
int i,l;
printf("enter the string\n");
gets(ch);
l = strlen(ch);
l = l-1;
for(i=0;i<=(l/2);i++)
{
temp = ch[i];
ch[i] = ch[l-i];
ch[l-i] = temp;
}
for(i=0;i<=l;i++)
{
printf("%c",ch[i]);
}
}
op :
enter the string
praveen
neevarp
0 comments: