Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  What are the disadvantages of arrays?a)Data s... Start Learning for Free
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 accessed
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
What are the disadvantages of arrays?a)Data structure like queue or st...
Disadvantages of Arrays

1. Wastage of Memory Space
When elements are inserted in an array and the number of elements is lesser than the allocated size of the array, there is a potential wastage of memory space. This is because the array reserves memory for the maximum number of elements it can hold, even if it is not fully utilized. For example, if an array is allocated to store 100 elements but only 50 elements are actually inserted, the remaining 50 memory locations remain unused, resulting in memory wastage.

2. Fixed Size
Arrays have a fixed size, meaning that the number of elements they can hold is predetermined during their declaration. This can be a disadvantage in situations where the number of elements is not known in advance or can vary dynamically. If the number of elements exceeds the allocated size of the array, it may lead to overflow or data loss. Similarly, if the number of elements is smaller than the allocated size, it results in wasted memory space.

3. Inefficient Insertion and Deletion
Insertion and deletion operations in arrays can be inefficient, especially when performed in the middle or beginning of the array. When an element is inserted or deleted, all the subsequent elements need to be shifted accordingly, which can be time-consuming and result in a high time complexity. This makes arrays less suitable for scenarios where frequent insertion or deletion operations are required.

4. Sequential Access
Elements in an array are stored in contiguous memory locations, which means that accessing elements sequentially is efficient. However, if there is a need to access elements randomly or based on a specific index value, arrays may not be the most suitable data structure. In such cases, other data structures like linked lists or hash tables offer better performance as they allow direct access to specific elements without traversing the entire array.

Conclusion
In conclusion, while arrays have several advantages like fast access to elements and simplicity, they also suffer from certain disadvantages. The potential wastage of memory space when the actual number of elements is lesser than the allocated size is a significant drawback. Additionally, the fixed size of arrays, inefficient insertion and deletion operations, and the sequential access of elements can limit their applicability in certain scenarios.
Free Test
Community Answer
What are the disadvantages of arrays?a)Data structure like queue or st...
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.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer?
Question Description
What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer?.
Solutions for What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer?, a detailed solution for What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer? has been provided alongside types of What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice What are the disadvantages of arrays?a)Data structure like queue or stack cannot be implementedb)There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated sizec)Index value of an array can be negatived)Elements are sequentially accessedCorrect answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev