Which of the following is a major disadvantage of a static array?

Options

  • A. Direct element access
  • B. Fixed size
  • C. Contiguous memory allocation
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Fixed size

Detailed Explanation

Correct Answer: B. Fixed size

Explanation: A static array generally has a fixed size that is determined when it is created.

  • Its size cannot normally be changed after allocation.
  • Unused allocated space may lead to memory wastage.
  • Insufficient capacity may require creating another array.