How many types of the array are there in the C++ programming language?
Options
- A. There are three types of arrays
- B. There are four types of arrays
- C. There are two types of arrays
- D. More than one of the above
- E. None of the above
Quiz Practice:
A. There are three types of arrays
Answer: (A) There are three types of arrays
Arrays in C++ are commonly classified according to their dimensions.
The three commonly discussed types are:
1. One-dimensional array — stores elements in a single sequence.
2. Two-dimensional array — stores elements in rows and columns.
3. Multidimensional array — has more than two dimensions.
Therefore, in the classification generally used in basic C++ questions, the answer is three types.