Search This Blog

Friday, 21 August 2020

Concatenating using + operatoer

 #include<iostream>

using namespace std;

int main()

{

string str1,str2,str3;

cout<<"Enter the first string:";

getline(cin,str1);

cout<<"Enter the second string:";

getline(cin,str2);

str3=str1+str2;

cout<<"new string is:"<<str3;

return 0;

}


No comments:

Post a Comment

Search This Blog

Contact Form

Name

Email *

Message *

Popular Posts