Which collection type does not have a fixed number of elements?

String

Array

List

The collection type that does not have a fixed number of elements is the List. Lists are dynamic collections that can grow and shrink in size as needed, allowing for the addition and removal of elements at runtime. This flexibility makes lists particularly useful for scenarios where the total number of items is unknown or can change frequently.

In contrast, strings are immutable collections of characters, meaning their size is defined upon creation and cannot be changed. Arrays, while they can hold multiple items, have a fixed size that is established when they are created. If you want to change the number of elements in an array, you would need to create a new array with the desired size and copy the existing elements into it. Int32 refers to a fixed-size integer data type that can hold only whole numbers in a specific range, and it does not represent a collection type at all. Hence, the only option that allows for a variable number of elements is the List.

Int32

Want more questions?

All options are one-time payments.

$25.99

30 day premium pass

All the basics to get you started

  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 30 day premium pass access
$59.99 $171.99 usd

6 month DELUXE pass (most popular)

Everything with the 30 day premium pass FOR 6 MONTHS! & the ultimate digital PDF study guide (BONUS)

  • Everything included in the premium pass
  • $171.99 usd value for $59.99! You save $106!
  • + Access to the ultimate digital PDF study guide
  • + 6 months of premium pass access
  • + Priority support
$15.99 $24.99

Ultimate digital PDF study guide

For those that prefer a more traditional form of learning

  • Available for instant download
  • Available offline
  • Hundreds of practice multiple choice questions
  • Comprehensive content
  • Detailed explanations
Image Description
Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy