#include <iostream>
using namespace std;
int strlen1(char *p)
{
int i=0;
while ( (*p)!=NULL )
{
p++;
i++;
}
return i;
}
void revers(char *p)
{
char s1[100]="";
int len;
while ( (*p)!=NULL )
{
len=strlen1(p);
s1[len-1]=*p;
p++;
}
cout << s1 << endl;
}
void main()
{
char str1[100]="";
cout << "Input string:";
cin >> str1;
cout << "The string length is:" << strlen1(str1) << endl;
revers(str1);
}