1.

What are the disadvantages of arrays?(a) Data structure like queue or stack cannot be implemented(b) There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size(c) Index value of an array can be negative(d) Elements are sequentially accessedThe origin of the question is Array and Array Operations topic in portion Abstract Data Types of Data Structures & Algorithms IThe question was asked during a job interview.

Answer»

Right choice is (b) There are chances of wastage of memory space if elements INSERTED in an ARRAY are lesser than the allocated SIZE

To explain: ARRAYS are of fixed size. If we insert elements less than the allocated size, unoccupied positions can’t be used again. Wastage will occur in memory.



Discussion

No Comment Found

Related InterviewSolutions