#include<cstring> // or string.h
int main(){
char a[4],b[]={"hello"};
memcpy(a,b,strlen(b)*sizeof(char));//destination,source,size*sizeof(type)
}
#include <cstring>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
char source[] = "Tutorial";
char destination[] = "Programiz";
// copy all bytes of destination to source
memcpy(destination, source, sizeof(source));
cout << destination;
return 0;
}
// Output: Tutorial