#include #include // max_subarray_sum 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 22 from elements 8 + 3 + 5 + 4 + -1 + 3 int max_subarray_sum(int size, int array[]) { 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[] = {8, 3, 5, 4, -1, 3, -5, -4}; int max_sum = max_subarray_sum(8, test_array); printf("%d\n", max_sum); return 0; }