#include #define NUM_COLS 5 // sum_after_even should return the total sum of the values // in each row of the 2D array, after the first even number. int sum_after_even(int num_rows, int array[][NUM_COLS]) { // PUT YOUR CODE HERE (you must change the next line!) return 42; } // This is a simple main function which could be used // to test your sum_after_even function. // It will not be marked. // Only your sum_after_even function will be marked. int main(void) { int test_array[][NUM_COLS] = { {16, 12, 8, 3, 1}, {2, 0, 10, 1, 4}, {1, 1, 1, 13, 1}, {5, 5, 5, 8, 2}, {5, 5, 5, 5, 5} }; // Note: if you change test_array, update the first argument below // to match the new number of rows. int result = sum_after_even(5, test_array); // Example Explanation: // {16, 12, 8, 3, 1}, | 12 + 8 + 3 + 1 = 24 // {2, 0, 10, 1, 4}, | 0 + 10 + 1 + 4 = 15 // {1, 1, 1, 13, 1}, | 0 // {5, 5, 5, 8, 2}, | 2 // {5, 5, 5, 5, 5} | 0 // -------------------------------------- // TOTAL = 24 + 15 + 0 + 2 + 0 = 41 printf("%d\n", result); return 0; }