正解:A
A vector is a type of data structure that can store a collection of data of the same data type in a dynamic sequence. A vector can grow or shrink in size as data is added or removed from it. A vector would be the best option for storing a collection of data in programming because it can accommodate different amounts of data and allow fast access to any element by using its index number. Repeating a similar operation, capturing user input, and performing mathematical calculations are not purposes of a vector in programming. References:
CompTIA IT Fundamentals+ Study Guide: Exam FC0-U61, Second Edition, Chapter 4: Programming Concepts and Data Structures, page 148.