Input
Output
#include <iostream> #include <cstring> using namespace std; int main () { char str1[30] = "Welcome to"; char str2[30] = "Onlinetpoint"; /* Copy the string str2 to str1 */ strcpy( str1, str2); cout << "Copy the string str2 to str1: "<< str1 ; return 0; }