Question: Upload a . c source file containing a main method that will implement the following program. Your program will implement a function named compare _
Upload a c source file containing a main method that will implement the following program.
Your program will implement a function named comparearrays that takes two arrays of int values and returns an int value computed as follows:
Find the smallest value in each of the array parameters lets call them s and s
Find the biggest value in each of the array parameters lets call them b and b
Compute and return x y where x is the smallest of b and b and y is the largest of s and s
You will also implement a main method that will ask the user to enter values for two arrays and then display the result returned by comparearrays. In order to make things a bit easier, we will assume that both arrays are always of the same size that you will define using #define.
Please note:
As you are implementing comparearrays, you must write helper functions to find the smallest and the largest value in an array.
You must also write a helper function that takes an array and fill it with data from the user the size will be available via the abovementioned #define constant
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
