Functions in C
Suppose there is a function that calculates the average of an array of numbers of type int. The function might look like this:
float iAverage(int array[], int length)
{
int sum = 0;
int j;
for (j = 0; j < length; j++)
sum += array[j];
return (float) sum / length ;
}