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...
Which is the proper way to determine how many characters are in the string variable named str?
a. str.getLength() b. str.length() c. length(str) d. getLength(str)
Computer Science & Information Technology
What is the value of x after the following code executes?
int x;
x = 3 / static_cast
Computer Science & Information Technology