FC0-U61 · Question #661
Which of the following is a programming language data type that contains a list of related values, such as colors?
The correct answer is B. Array. An array is a programming language data type specifically designed to store a collection of related values, such as a list of colors, in an ordered sequence.
Question
Which of the following is a programming language data type that contains a list of related values, such as colors?
Options
- AString
- BArray
- CFloat
- DBoolean
How the community answered
(30 responses)- A3% (1)
- B90% (27)
- C7% (2)
Why each option
An array is a programming language data type specifically designed to store a collection of related values, such as a list of colors, in an ordered sequence.
A `String` data type represents a single sequence of characters (text) and is not designed to hold a list of distinct, related values.
An array allows for the efficient storage and manipulation of multiple elements of the same type under a single variable name, accessed via an index. This structure is ideal for representing lists or collections of related data, such as a group of color names.
A `Float` data type stores a single real number with decimal points, not a collection or list of values.
A `Boolean` data type stores a single truth value (true or false), not a collection or list of values.
Concept tested: Programming data structures - Collections
Topics
Community Discussion
No community discussion yet for this question.