Page 1 of 1

11. What is the output of the following code? double balance[5] {100.0, 250.0, 325.8, 580.8, 1100.0); sont double INT_RA

Posted: Sat May 14, 2022 4:21 pm
by answerhappygod
11 What Is The Output Of The Following Code Double Balance 5 100 0 250 0 325 8 580 8 1100 0 Sont Double Int Ra 1
11 What Is The Output Of The Following Code Double Balance 5 100 0 250 0 325 8 580 8 1100 0 Sont Double Int Ra 1 (52.83 KiB) Viewed 49 times
11. What is the output of the following code? double balance[5] {100.0, 250.0, 325.8, 580.8, 1100.0); sont double INT_RATE - 0.1; cout << fixed << showpoint. << setprecision(2); for (int count = @; count < 5; count++) cout << (balance [count] . INT_RATE) << endl; . 12. When an array name is passed to a function (an actual parameter"), what is actually being passed? 13. The arrays array1 and array2 each hold 25 integer elements. Write code that copies the values in array to array2. 14. The following code totals the values stored in each of the two arrays. Will the code print the correct total for both arrays? Why or why not? int total - ®; # Accumulator int count; // Loop counter // Calculate and display the total of the first array. I for (count = 0; count <= 25; count++) total += array[count]; sout << "The total for array1 is " << total << endl; // Calculate and display the total of the second array for (count - @; count <= 25; count++) total + array2[count]; cout << "The total for array2 is << total << endl; 15. The below code fragment contains one or more errors. Locate them and explain what is/are wrong void showValues(int. Quas.) for (int count = 0; count < 8; count++) sout << was. [count]; } 16. (Optional 2D array problelm) Write a segment of code to declare and then fill a two-dimensional array named settings with values shown in the table below. 12 34 43 14 65 90 19 1 12