Check out example codes for "how to input a string into a char array cpp". It will help you in understanding the concepts better.

Code Example 1

strcpy(my_array, my_string.c_str());

Learn ReactJs, React Native from akashmittal.com