Answers for "pop back innstring"

C++
0

pop back innstring

// string::pop_back
#include <iostream>
#include <string>

int main ()
{
  string str ("hello world!");
  str.pop_back();
cout << str << 'n';
  return 0;
}  // ans : hello world
Posted by: Guest on February-03-2022

Browse Popular Code Answers by Language