CompTIA ITF+ (FC0-U61) — Question 63
Which of the following is the BEST option for a developer to use when storing the months of a year and when performance is a key consideration?
Answer options
- A. Array
- B. Vector
- C. List
- D. String
Correct answer: A
Explanation
An Array is the most efficient choice for storing the months of the year due to its fixed size and fast access times. Vectors and Lists, while flexible, introduce overhead that can slow down performance, and Strings are not appropriate for storing discrete values like months.