#include #include #define SIZE 10 // sum_cont_subarray should return the largest contiguous sum // of a subarray in a given array // eg // For an array with elements 8, 3, 5, 4, -1, 3, -5, -4 // you would get 20 from elements 8 + 3 + 5 + 4 + -1 + 3 int sum_cont_subarray(int array[SIZE]) { return 42; } // This is a simple main function which could be used // to test your sum_cont_subarray function. // It will not be marked. // Only your sum_cont_subarray function will be marked. int main(void) { int test_array[SIZE] = {8, 3, 5, 4, -8, -3, -5, -4}; int max_subarray_sum = sum_cont_subarray(test_array); printf("%d\n", max_subarray_sum); return 0; }