Open In App

Top | MCQs on Array Data Strcuture with Answers | Question 16

Which of the following is the limitation of the array?

(A)



elements can be accessed from anywhere.

(B)



The size of the array is fixed.

(C)

Indexing is started from Zero.

(D)

Memory waste if an array’s elements are smaller than the size allotted to them

Answer: (D)
Explanation:

Suppose we have an arry like : arr[5] ={1, 2, 3}

Here we have declared the size of the array as 5, but we have initialized only  3 values to it. So it leads to memory wastage.

Hence Option (D) is correct.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :
Uncategorized