nerdexam
CompTIA

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.

Software Development

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)
  • A
    3% (1)
  • B
    90% (27)
  • C
    7% (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.

AString

A `String` data type represents a single sequence of characters (text) and is not designed to hold a list of distinct, related values.

BArrayCorrect

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.

CFloat

A `Float` data type stores a single real number with decimal points, not a collection or list of values.

DBoolean

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

#data types#arrays#programming fundamentals

Community Discussion

No community discussion yet for this question.

Full FC0-U61 Practice