What is wrong with the following code fragment?

const int SIZE =5;
float scores[SIZE];
for(int i=0; i<=SIZE;i++)
{
cout << "Enter a score\n";
cin >> scores[i];
}

a. Array indexes start at 1 not 0
b. Arrays must be integers
c. Array indexes must be less than the size of the array
d. Should be cin >> scores[0];


c. Array indexes must be less than the size of the array

Computer Science & Information Technology

You might also like to view...

MC The control value of a for structure that iterates a sequence represents the______of each element.

a) value. b) subscript. c) location in memory. d) None of the above.

Computer Science & Information Technology

Input a fuel tank (capacity and current) from input stream

What will be an ideal response?

Computer Science & Information Technology

In the XML of a Web feed, the presence of the tag indicates that a feed is in ____ format.

A. RSS B. podcast C. Atom D. Web feed

Computer Science & Information Technology

Of the three, PAP, CHAP, and MS-CHAP, ____________________ offers the most security for dial-up authentication.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology