In C, a string can only be represented as an array of characters. Therefore, to represent an array of strings, you need to create an array (an array of characters). In C ++, we have an STL string, a string, and you can create an array of strings and use it in the form in which you wrote (for example, with modifications of C-specific elements in your code).
source share