157k views
4 votes
if numbers is a two-dimensional array, which of the following would give the number of columns in row r? a. numbers[r].length[r] b. numbers.length c. numbers.length[r]

User Barerd
by
3.4k points

1 Answer

5 votes

Answer:

The number of columns in row r of a two-dimensional array numbers can be obtained using the expression numbers[r].length.

Step-by-step explanation:

For example, if numbers is a two-dimensional array with two rows and three columns, the expression numbers[1].length would return the value 3, indicating that the second row of the array contains three columns.

User Marisel
by
2.8k points