Question: - 4. Consider the following function main: int maino { int alpha[20]; int beta[20]; int gamma[4] = ${11, 13, 15, 17} ; $ int delta[10]

 - 4. Consider the following function main: int maino \{ int

- 4. Consider the following function main: int maino \{ int alpha[20]; int beta[20]; int gamma[4] = $\{11, 13, 15, 17\} ; $ int delta[10] = $\{3,5,2,6,10,9,7,11,1,8\} ; $ a. Write the definition of the function setZero that initializes any one-dimensional array of type int to O. b. Write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. Ex-10 ENGR2217 SP20 c. Write the definition of the function doubleArray that initializes the elements of beta to two times the corresponding elements in alpha. Make sure that you prevent the function from modifying the elements of alpha. d. Write the definition of the function printarray that prints any one- dimensional array of type int. Print 15 elements per line. CS.VS. 1125

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!