Question: 4) Write a C++ program where the structure of it is as follows: a) Declare two arrays namely array1 and array2 in the main program.

 4) Write a C++ program where the structure of it is

4) Write a C++ program where the structure of it is as follows: a) Declare two arrays namely array1 and array2 in the main program. b) Initialize array I as: int array1[6]={ 6, 4, 3, 7, 5, 8); c) Initialize array2 by asking the user to enter elements and its size same as the array array. d) Write a function to calculate the summation of even numbers ONLY in array1 called Sum Even() e) Write a function to calculate the summation of odd numbers ONLY in array2 called SumOddo f) Call two functions Sum Even() and SumOddo from the main function. g) Write prototypes for all the possible functions in the program. h) Display the result for each operation in the function itself. Enter the elements of the array2: 3 4 8 5 1 6 The summation of even numbers in array1 is 10 The summation of odd numbers in array2 is 9

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!