Which of the following is the disadvantage of the array?
2024
Which of the following is the disadvantage of the array?
- A.
Stack and Queue data structures can be implemented through an array.
- B.
Index of the first element in an array can be negative
- C.
Wastage of memory if the elements inserted in an array are lesser than the allocated size
- D.
Elements can be accessed sequentially.
Attempted by 790 students.
Show answer & explanation
Correct answer: C
Answer: c
Explanation: The answer is c. For example, if we have an array of size 10 elements and we have inserted only 5 elements in an array then there is a wastage of 5 memory blocks which cannot be utilized by another variable.