Answers for "reverse string using pointer in cpp"

C++
-1

reverse string c++

#include <iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
string str;
  getline(cin,str);
  reverse(str.begin(),str.end());
  cout<<str;
}
Posted by: Guest on July-06-2021

Code answers related to "reverse string using pointer in cpp"

Browse Popular Code Answers by Language