Notice that we call the function ``addArray'' three times. Each time we give the same array (y) as a parameter, but each time we give a different size. We can safely use any size we want as long as it is smaller than the actual size of the array. So the first two calls are OK--we are just directing ``addArray'' to add up half of the array in the second call. But we must be careful not to include calls like the third one. In this case, ``addArray'' will happily read past the end of the array with the usual unpredictable results.

Return to lesson.