The core feature that distinguishes a vector from other data structures is its ability to resize dynamically, accommodating more elements as needed. This is unlike a 'static array', which has a fixed size determined at the time of its creation and cannot grow or shrink. An 'object with dynamic properties' refers to the ability to add or remove properties from an object at runtime, which is unrelated to a vector's primary attribute of resizing. A 'stack' is a last-in, first-out (LIFO) data structure used for storing items where only the last item can be accessed, which contrasts with a vector's more flexible indexing capability. Thus, the correct answer highlights the vector's defining trait of dynamic resizing.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is dynamic resizing in the context of a vector?
Open an interactive chat with Bash
How do vectors differ from static arrays?
Open an interactive chat with Bash
What are some common use cases for vectors in programming?