Which of the following is not a disadvantage to the usage of the array?
A. Fixed size
B. There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size
C. Insertion based on position
D. Accessing elements at a specified position
Answer:D
Which of the following is not a disadvantage to the usage of the array?
A. Fixed size B. There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size C. Insertion based on position D. Accessing elements at a specified position
Explanation: Array elements can be accessed in two steps. First, multiply the size of the data type with the specified position, second, add this value to the base address. Both of these operations can be done in constant time, hence accessing elements at a given index/position is faster.