/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include <string>
using namespace std;
int main()
{
// string s1(); function declaration
string s1; //default constructor
string s2(s1); //copy constructor
s2 = "abcdf";
string s3(s2, 2); //substring constructor
cout<<s2<<" "<<s3<<endl;
string s4("test"); //from c-string
string s5("test", 2); //from sequence
string s6(10, 'a'); //fill constructor
string s7(s6.begin(), s6.end());
cout<<s1<<"\n"<<s2<<"\n"<<s3<<"\n";
cout<<s4<<"\n"<<s5<<"\n"<<s6<<"\n";
cout<<s7<<"\n";
return 0;
}