Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C++ program, which declares an array of ten (10)integers. This array is

ID: 3614134 • Letter: W

Question

Write a C++ program, which declares an array of ten (10)integers. This array is then passed to a function with the name“EvenTotal(…)”. The function“EvenTotal(…)” has following declaration:

int EvenTotal (int * ptrArray, int Size);

This function is called from main function. It takes the addressof first array element and size of array as arguments, it then usesa loop structure to calculate the sum of all the even integers inthe array, the sum is then returned to main function, which thenprints this number on console. E.g.

For the array:

int array[10]= {1,2,3,4,5,6,7,8,9,10}

It will print the following output:

Sum of Even Numbers: 30

Explanation / Answer

please rate - thanks # include using namespace std; int EvenTotal (int * ptrArray, int Size); int main () {int array[10]= {1,2,3,4,5,6,7,8,9,10}; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote