Mega Code Archive

 
Categories / C / Code Snippets
 

Using the strcpy function

#include <iostream> #include <string> using namespace std; #define iSIZE 20 main( ) { char s[iSIZE]="Initialized String!",d[iSIZE]; strcpy(d,"I Love Clementine"); cout << "\n" << d; strcpy(d,s); cout << "\n" << d; return(0); }