CompTIA ITF+ (FC0-U61) — Question 37

Which of the following BEST describes the purpose of a vector in programming?

Answer options

Correct answer: A

Explanation

The correct answer is A because a vector is primarily used to hold multiple items of data in a single variable, making it easier to manage collections. Options B, C, and D describe different programming concepts and operations that do not accurately represent the main purpose of a vector.