Answers for "C++ String Concatenation Example"

C++
0

C++ String Concatenation Example

#include <iostream>  
#include <cstring>  
using namespace std;  
int main()  
{  
    char key[25], buffer[25];  
    cout << "Enter the key string: ";  
    cin.getline(key, 25);  
    cout << "Enter the buffer string: ";  
     cin.getline(buffer, 25);  
    strcat(key, buffer);   
    cout << "Concatenation = " << key << endl;  
    return 0;  
}
Posted by: Guest on May-05-2022

Code answers related to "C++ String Concatenation Example"

Browse Popular Code Answers by Language