1#include <iostream>
2using namespace std;
3int main()
4{
5 char str[] = "Reverseme";
6 char reverse[50];
7 int i=-1;
8 int j=0;
9 /*Count the length, until it each at the end of string.*/
10 while(str[++i]!='\0');
11 while(i>=0)
12 reverse[j++]=str[--i];
13 reverse[j]='\0';
14 cout<<"Reverse of a string is"<< reverse;
15 return 0;
16}