C++ Program to Concatenate Two Strings

C++ Program to Concatenate Two Strings : You will get the C++ program to concatenate two string without using the library function.

C++ Program to Concatenate Two Strings

#include <iostream>
using namespace std;
int main()
{
    string s1, s2, result;
    cout << "Enter string s1: ";
    getline (cin, s1);
    cout << "Enter string s2: ";
    getline (cin, s2);
    result = s1 + s2;
    cout << "Resultant String = "<< result;
    return 0;
}

Output of Program

Enter string s1: 53
Enter string s2: 77
Resultant String = 5377