Answers for "c++ delete last 0"

C++
1

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

Browse Popular Code Answers by Language