In this program, we are going to share copy strings program in c++ programming language with the output. If you are a beginner and want to start learning the c++ programming, then keep your close attention in this tutorial as I am going to share a C++ program to copy strings with the output.
Copy the below C++ program and execute it with the help of Turbo C compiler. At the end of this program, We have shared the output of this program.
using namespace std;
char string1, string2;
cout << "Enter string string1: ";
cout << "string1 = "<< string1 << endl;
cout << "string2 = "<< string2;
Enter string string1: freewebmentor
string1 = freewebmentor
string2 = freewebmentor
Liked this program? Do Like & share with your friends.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: c++ program to concatenate two strings, c++ program to copy one string to another without using string functions, c++ programs for string operations, c++ programs with example, copy one string to another in c++ without using strcpy, copy string objects in C++, string copy function in c++, string copy in c++ using pointers