CompTIA ITF+ (FC0-U61) — Question 37
Which of the following BEST describes the purpose of a vector in programming?
Answer options
- A. Storing a collection of data
- B. Repeating a similar operation
- C. Capturing user input
- D. Performing mathematical calculations
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.