1#include <iostream>2#include <cstring>3usingnamespacestd;45intmain ()6{7charstr1[]="Sample string";8charstr2[40];9charstr3[40];1011memcpy (str2,str1,strlen(str1)+1);12memcpy (str3,"copy successful",16);1314cout<<"str1:"<<str1<<endl;15cout<<"str2:"<<str2<<endl;16cout...
1#include <iostream>2#include <cstring>3usingnamespacestd;45intmain ()6{7charstr1[]="Sample string";8charstr2[40];9charstr3[40];1011memcpy (str2,str1,strlen(str1)+1);12memcpy (str3,"copy successful",16);1314cout<<"str1:"<<str1<<endl;15cout<<"str2:"<<str2<<endl;16cout...