pastebin

Paste Search Dynamic
Recent pastes
str1 length
  1. include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main() {
  6.         string str1 = "abcdefhmj";
  7.  
  8.         cout << str1.substr(str1.length() - 1) << endl;
  9.         cout << str1.substr(str1.length() - 2) << endl;
  10.         cout<< str1.substr(str1.length() - 3) << endl;
  11.          cout<< str1.substr(str1.length() - 4) << endl;
  12.            cout<< str1.substr(str1.length() - 5) << endl;
  13.  
  14.         return 0;
  15. }
Parsed in 0.006 seconds