Que-make a program for reverse a string?
#include<iostream>
using namespace std;
int main()
{
string in;
cout<<"enter string :";
cin>>in;
cout<<"entered string is :"<<in<<endl;
reverse(in.begin(), in.end()) ;
cout<<"after reversing :"<<in;
return 0;
}
Result:-
Tags
String problems