Programming Fundamentals

Download count_bigger.c here

Or, copy these file(s) to your CSE account using the following command:

1511 fetch-activity count_bigger

Your task is to add code to this function in count_bigger.c:

// return the number of "bigger" values in an array (i.e. larger than 99
// or smaller than -99).
int count_bigger(int length, int array[]) {
    // PUT YOUR CODE HERE (you must change the next line!)
    return 42;
}

count_bigger should return a single integer: the number of values in the array which are larger than 99 or smaller than -99.

For example if the array contains these 8 elements:

141, 5, 92, 6, 535, -89, -752, -3

Your function should return 3, because these 3 elements are bigger than 99 or smaller than -99:

141, 535, -752

Assumptions/Restrictions/Clarifications