. What are the disadvantages of arrays


A: We must know beforehand how many elements will be there in the array

B: There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size

C: Insertion and deletion becomes tedious

D: All of the mentioned

 

Best Answer

Explanation:

  • The arrays are not capable of changing their size at the run time. 
  • Moreover, we have to mention the size of the array during its initialization. 
  • For inserting an element in the array we need to copy the array in the other array having a size greater than the older array by one. 
  • When an element gets deleted, an empty memory area is left in the array. So it is not memory efficient to delete elements from an array.
  • Hence, all the above options are the disadvantages of the array.

Final Answer:

Hence, the correct option is D i.e., All of the mentioned.

Talk to Our counsellor