Question: Describe any mistake(s) in the following code segment. const int SIZE = 5; array items; items = 5; 2. Describe any mistake(s) in the following

 Describe any mistake(s) in the following code segment.

const int SIZE = 5;
array items;
items = 5;


2. Describe any mistake(s) in the following code segment.

const int SIZE = 5;
array items = {};
items[SIZE] = "Book";


3. Describe any mistake(s) in the following code segment.

int SIZE = 10;
array items = {};
items = 10.5;


4. Complete the following steps in code and submit your code.

  • Declare an array of size 9 containing doubles.
  • Prompt the user to enter 9 doubles and store each into the elements of the array. Hint: you can use cin to store input directly into an indexed array.
  • Display the first, fifth (statistically the median or "middle" element), and last element of the array. You must use the array to receive credit.


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

code segment 1 mistakeThe type of the array is not specified corrected code const int SIZE 5 int ite... View full answer

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 Programming Questions!