Question 1 Write a program that does the following: The program has a main() and a function maxArray(). The maxArray() function has two parameters: a 1-dimensional array of integers and the size of the array. The maxArray() function returns the biggest (i.e., maximum) value stored in the array. The main() includes the declaration and initialization of an array named arr of 10 integers. The main() calls the functions maxArray() and displays the maximum value stored in the array arr. You are required give the complete program in your answer including the compiler directive(s), function prototype, etc. Question 2 Write a program that does the following: Declares and initializes a 2-dimensional array of size ROW and COL, where ROW and COL are declared as constants. Initialize the array with the following values: 1 2 3 10 20 30 100 200 300 1000 2000 3000 Uses for statements to display the sum of the values in each row of the array. For example, the programs displays the following values for the array given above: 6 60 600 6000 You are required give the complete program in your answer including the compiler directive(s), etc. You program should work for any value stored in the array.
Get Free Quote!
365 Experts Online