Question: In C: Write a program that includes the following three functions: correct_min_sec(...) This function will take in two integer parameters, min and sec. The function
In C:
Write a program that includes the following three functions:
correct_min_sec(...)
This function will take in two integer parameters, min and sec.
The function will update the parameters (if necessary) to be in normal min:sec format. That is, if the seconds value is greater than 59, the function needs to recalculate the min and sec values such that the seconds value is less than 60 and the extra minutes are accounted for.
count_odd(...)
This function will take in a 1D integer array and the number of filled elements in the array as parameters.
The function will count the number of odd values in the 1D array and return the count.
matrix_positive(...)
This function will take in a 2D integer array and the number of filled rows in the 2D array as parameters. The 2D array will always have 6 columns.
The function will go through all of the filled elements in the 2D array, changing all of the negative values to zero (but not changing any of the positive values).
For testing: In main, declare the 1D array to have 60 elements and the 2D array to have 20 rows and 6 columns.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
