Question #3314

Write a program to concatenate two strings

Expert's answer

#include <iostream>
#include <string>
using namespace std;

int main()
{
string str1 = "hello", str2 = "world";
string str3 = str1 + str2;
cout << str3 << endl;

return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS