#include#include using namespace std; int main(){ string str = "Hello World"; cout << str << endl; return 0; }
Hello World
#include#include using namespace std; int main(){ string str1 = "Hello"; string str2 = " World"; string result = str1 + str2; cout << result << endl; return 0; }
Hello World
#include#include using namespace std; int main(){ string str = "Hello"; cout << "Length of string is: " << str.length() << endl; return 0; }
Length of string is: 5Package library - Standard Library (STL)