//
Passing arrays and individual array elements to functions.
#include
<iostream>
using
namespace std;
void modifyArray( int [], int ); // appears strange
void modifyElement( int );
int main()
{
const int arraySize = 5; // size
of array a
int a[ arraySize ] = { 0, 1, 2, 3, 4 }; // initialize a
cout << "Effects
of passing entire array by reference:"
<< "\n\nThe
values of the original array are:\n";
// output original array
for ( int i = 0; i < arraySize; i++ )
cout << “\t”
<< a[ i ];
Syntax
for accepting an array in parameter list.