Question: Please fill in the blanks. No work need to be shown. It's in C++ Given an incomplete program below, complete the program by filling in

Please fill in the blanks. No work need to be shown. It's in C++

Please fill in the blanks. No work need to be shown. It's

in C++ Given an incomplete program below, complete the program by filling

Given an incomplete program below, complete the program by filling in the blanks with an appropriate C++ statement according to the instructions stated in the comments. This program copies all the elements of a 2D array to a ID array. Then, double the sum of all the elements. Note: Please write C ++ statements WITHOUT blank spaces unless it is absolutely needed. Example: int num, a,b; 1 #include using namespace std; 2 4 1/a) Write DoubleTotal function prototype (2 marks) 16 7 8 9 int main() { /*b) Declare 2D array type integer, 2 columns 3 rows named Arri with initial value: 1,2,3,4,5,6. Note: Write your answer WITHOUT using {} symbols (2 marks)*/ }; 10 111 112 13 114 115 16 17 18 119 /*c) Declare 10 array type integer named Arr2 with size declarator 6 (1 mark)*/ int n; 20 21 22 23 24 25 26 27 //d) Copy all elements of array Arri to Arr2 (3 marks) for (int i=0; ; i++) //forrow for (int j=; ; j++) //for column int n = 0; 1/d) Copy all elements of array Arri to Arr2 (3 marks) for (int i=; ; i++) //forrow 20 21 22 23 24 25 26 27 28 29 30 31 32 33 for (int j=0; ; j++) // for column { n++; } /*e) Call function DoubleTotal, pass array Arr2 and display the returned value (2 marks)*/ 34 35 36 37 38 39 40 41 42 43 return 0; } /DoubleTotal function definition double DoubleTotal(int A[], int x) { double sum=; 1/f) Calculate sum of all elements (3 marks) for (int j =0; ; j++) 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1/8) Multiply sum by 2 (2 marks) return sum

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!