/* Program to illustrate passing an array of strings to a function */ #include #include using namespace std; const int SIZE = 5; //function prototype void printthearray(string str[]); int main() { string str[SIZE]; string tempstr; str[0] = "Jones"; str[1] = "Harrow"; str[2] = "Tenenbaum"; str[3] = "Arnow"; str[4] = "Raphan"; // print the array printthearray(str); // system("pause"); //un-comment when using DevC++ return 0; } void printthearray(string str[]) { //print the original array cout << "The Array of Strings" << endl; for (int i = 0; i < SIZE; i++) cout << str[i] << endl; return; }