Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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;  
}
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #String #Concatenation #Example
ADD COMMENT
Topic
Name
6+4 =