1.

Which of the following is a disadvantage of dynamic arrays?(a) Locality of reference(b) Data cache utilization(c) Random access(d) Memory leakI'd like to ask this question from Dynamic Array in chapter Arrays Types of Data Structures & Algorithms II have been asked this question in an interview for job.

Answer»

Right ANSWER is (d) Memory leak

Explanation: Dynamic arrays share the ADVANTAGE of arrays, added to it is the dynamic addition of elements to the ARRAY. Memory can be leaked if it is not HANDLED properly during allocation and deallocation. It is a disadvantage.



Discussion

No Comment Found

Related InterviewSolutions