Answers for "remove last space from printing array c++"

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
1

C++ remove last element from array

Not Possible because C++ array has fixed size
Posted by: Guest on November-07-2020

Code answers related to "remove last space from printing array c++"

Browse Popular Code Answers by Language