Which of the following is a disadvantage of using arrays?

Practice Questions

Q1
Which of the following is a disadvantage of using arrays?
  1. Fixed size
  2. Random access
  3. Easy to implement
  4. Memory locality

Questions & Step-by-Step Solutions

Which of the following is a disadvantage of using arrays?
  • Step 1: Understand what an array is. An array is a collection of items stored at contiguous memory locations.
  • Step 2: Know that arrays have a fixed size. This means that when you create an array, you must specify how many items it can hold.
  • Step 3: Realize that if you don't know how many items you will need to store in advance, you might create an array that is too small.
  • Step 4: If the array is too small, you cannot add more items than it can hold, which can be a problem.
  • Step 5: This limitation of fixed size is the disadvantage of using arrays.
No concepts available.
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely