Lecture 7 Objectives
At the end of today's class you should
KNOW:
- That an array is a data structure consisting of related data items
of the same type
- That the size of an array needs to be determined by compile time
(you may not use a variable to define the size of an array)
BE ABLE TO:
- Define and initialize an array
- Process an array using iteration
- Process an array using recursion
- Pass an array to a function
Sample Exam Question:
Write a recursive C function that will determine the sum of the numbers
stored in an int array. The function is given the name of the array
and the number of elements in the array. Here is the function heading:
int sumElements (int theArray[], int size)