Note that the above array can hold a list of up to 4 cstrings (representing here the names of scientists), and each cstring can have up to 9 characters.
An array of cstrings can be manipulated by using both indexes simultaneously like any other two-dimensional arrays.
It is better to manipulate it by a loop that steps through the first index and treats each indexed variable as a single cstring variable that is manipulated by some cstring function.
An example (and a bit of gossip) is shown below:
#include <iostream> using namespace std;
int main ( )
{ char scientists[4][10];
cout << "Enter the names of 4 famous scientists.\n"; for (int n = 0; n < 4; n++)
{
cout << "This scientist married " << n << " times: ";
cin.getline(scientists[n],10);
// since the names contain no whitespaces,
// we can also use:
// cin >> scientists[n];
cout << "Are you sure " << scientists[n] << " married "
<< n << " times?\n";
} return 0;
}