147k views
2 votes
What is a 2D array?

a) An array of numbers
b) An array of strings
c) An array of arrays
d) An array of objects

1 Answer

1 vote

Final answer:

A 2D array is (c) an array of arrays, functioning as a table or grid structure in programming for structured data storage and manipulation.

Step-by-step explanation:

A 2D array is accurately described as (c) an array of arrays. Imagine it as a table or a grid consisting of rows and columns. In programming, a 2D array is created by combining multiple one-dimensional arrays (arrays of numbers, strings, objects, etc.) to form a new structure where each element of the primary array is itself an array.

For example, you might have an array representing each row in a game board, with each of these arrays holding the cells of that row. This allows programmers to store and manipulate data in a structured, two-dimensional format.

User Adjua
by
7.4k points