/* * array0.cpp (sklar/05-apr-2009) * * this program demonstrates using a global array in a function. * */ #include #include #include using namespace std; /* * declare global variables */ const int MAX = 5; // declare size of array as a constant int myArray[MAX]; // declare array, globally /* * declare and define the printArray() function to display the * elements of the array */ void printArray() { for ( int i=0; i