Question: C++ urgent Given the following code segments in Figure 2. int Numbers [5]; Numbers [0] = 3.0; Numbers [1] = 4.0 for (i=1; i3) Numbers[i]

 C++ urgent Given the following code segments in Figure 2. int C++ urgent

Given the following code segments in Figure 2. int Numbers [5]; Numbers [0] = 3.0; Numbers [1] = 4.0 for (i=1; i3) Numbers[i] = Numbers[i] / 4; Figure 2: C++ Code Segments (a) What is stored in Numbers [] after the following C++ code executes? Draw memory illustration diagram to show the final values of each memory. (10 marks) (b) Write the C++ statements to modify the above code to change the size Numbers [] to 20 and sum all elements and output it. (5 marks) (c) Write the C++ statements to declare new array name your Numbers [] and copy the content of Numbers [] into it. Then output the highest and lowest value in your Numbers []. (10 marks)

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!