206k views
2 votes
Ben says that an array with 2 rows and 5 columns has 8 items. Is this reasonable? Explain why or why not

User Vijaya
by
5.9k points

1 Answer

2 votes

Answer:

Incorrect

Explanation:

Consider an array with 2 rows and 5 columns.

Each row contains 5 elements (one element per column).

Thus, two rows contain


5 +5=10

elements.

Therefore, Ben is incorrect.

In general, the array with m rows and n columns cotains


m\cdot n

elements.

User Marwen Trabelsi
by
5.6k points