Question: In C++ Exercise #1: Find in Array Implement the following functions: 1) Name: Initialize a. Parameters: int 1D array list, int size b. Job: The


In C++
Exercise #1: Find in Array Implement the following functions: 1) Name: Initialize a. Parameters: int 1D array list, int size b. Job: The function will fill the array list with random numbers from 20 to 80 2) Name: Print a. Parameters: int 1D array list, int size b. Job: The function will display all the elements of the array list on a single line. 3) Name: Find Parameters: int 1D array list, int size, int N The function will search for the value N in the array list. If N is found then it will return the location of N in the list. If N is not found then the function will return -1 a. b. The main() function is provided on the next page. You only need to implement the three functions. Please note that your output will be different, because the numbers are generated randomly. Sample Input / Output Array: 80 66 52 22 57 26 21 34 35 72 nter a number 57 57 was found at location Array: 32 52 74 77 60 21 42 71 65 54 Enter a number 10 10 Was not found 1/2 int main() srand(time(0)) int list [10], N, loc; Initialize(list, 10); cout>N loc - Find(list, 10, N); if(loc = -1) else cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
