240,641 views
15 votes
15 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 FBwall
by
2.6k points

1 Answer

15 votes
15 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 Emmanuel Gleizer
by
2.9k points