High School

Write a statement that assigns 99 to the fifth row, third column of the array `numvals`. Note: The first row/column is at index 0, not 1.

A. `numvals[5][3] = 99;`

B. `numvals[3][5] = 99;`

C. `numvals[4][2] = 99;`

D. `numvals[2][4] = 99;`

Answer :

Final answer:

To store the value 99 in the fifth row, third column of an array called numvals, you would use the statement numvals[4][2] = 99. The correct option is (c).

Explanation:

To assign 99 into the fifth row, third column of array numvals:

  1. Identify the correct index for the fifth row and third column - In programming, arrays start indexing from 0, so the fifth row would be index 4 and the third column would be index 2.
  2. Write the statement correctly - The correct statement would be numvals[4][2] = 99;
  3. Understand the array notation - The first number in the square brackets represents the row, and the second number represents the column.