Question: 2. Write a program that multiplies two arrays. The arrays are multiplied on an element-by-element basis, e.g. [4,2,7] *[3, 5, 8] - [12, 10, 56].

 2. Write a program that multiplies two arrays. The arrays are

2. Write a program that multiplies two arrays. The arrays are multiplied on an element-by-element basis, e.g. [4,2,7] *[3, 5, 8] - [12, 10, 56]. The program should include the following function void multiply (int al[l, int n, int a2[l, int a3]) The function multiplies element by element of an input array a1 of length n with an input array a2 of length n, stores the result to an output array a3. 1) 2) 3) Name your program array_multiply.c. Assume the input arrays have the same number of elements In the main function, declare the input arrays and the output array after reading in the number of element of the arrays, then read in the elements, then call the multiply function. The main function should display the output array. Example input/output #1: Enter the length of the arrays: 5 Enter the elements of the array #1: 3 4 7 14 9 Enter the elements of the array #2: 12 8 2 5 3 Output: 36 32 14 70 27

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!