Answers for "remove last index of the string in c++"

C++
0

remove last index of the string in c++

#include <iostream>
using namespace std;
int main()
{
    string input;
    cout<<“Enter a string : “<<endl;
    cin >> input;
    cout<<“Removed last character : “<<input.substr(0, input.size() - 1)<<endl;
}
Posted by: Guest on October-11-2021

Code answers related to "remove last index of the string in c++"

Browse Popular Code Answers by Language