/* * array2.cpp (sklar/05-apr-2009) * * this program demonstrates passing an array to a function as a * reference parameter. * */ #include #include #include using namespace std; /* * declare global variable */ const int MAX = 5; // declare size of array as a constant const int MAXD = 15; /* * declare and define the printArray() function to display the * elements of the array that is passed as an argument to the function */ void printArray( int myArray[], int numArray ) { for ( int i=0; i