Reversing a string
Posted on 2009-02-11
i need a small function to reverse a string, it wil be called once from main along with string to be reversed as an argument. When control comes back in main, string is printed, it should have been reversed.
cout<<"Reversed String is " << str ;
void Reverse(char *s) //suppose its prototype is given before main.
//function body with recursive calls and ifs etc.
Please provide me the body of the Reverse function.