207k views
2 votes
True/False: If a C++ program contains the following array definition int score[10]; the following statement would store 100 in the first array element: score[1] = 100;

User Rxin
by
5.1k points

1 Answer

5 votes

Answer:

False.

Step-by-step explanation:

score[10];

score[1]=100;

This statement will store 100 in the second position of the array because the indexing of the array starts from 0 to size-1 in this case indexing is from 0 to 9.So the element stored at position 0 is the first element in the array score 100 is in the second position.So we conclude that the answer is False.

User Kory
by
5.3k points