Check out example codes for "c copy string". It will help you in understanding the concepts better.

Code Example 1

char *str = "Hello World!";
char copy[64];		// or 'char *copy = malloc(strlen(str) + 1);'
strcpy(copy, str);

Learn ReactJs, React Native from akashmittal.com