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 a vector in programming?
Open an interactive chat with Bash
How does dynamic resizing work in vectors?
Open an interactive chat with Bash
What are the advantages of using vectors over arrays?