Advertisements
Advertisements
Question
What is the need of Dimensional Array? Explain.
Answer in Brief
Solution
- Assume we want to save 20 students' English marks. We will need to employ 20 different variables. Remembering the variable names becomes a difficult task. Attempting to save all 20 values in a single variable will result in the variable only holding the last assigned value.
- To prevent the problems described above, an array is required. Arrays require only one variable name with indexes, making it easier to memorize. Values will not be overwritten since each subscripted variable relates to a specific memory address.
shaalaa.com
Is there an error in this question or solution?