Exam-style question
Try this first
Which of these data structures is best suited for storing a collection of characters that form a piece of text?.
- A.An integer array
- B.A boolean array
- C.A string
- D.A record
Answer and explanation
Concise answer
A string
Why this is correct
Strings are specifically designed for storing and manipulating sequences of characters (text). Integer arrays store numbers, boolean arrays store true/false values, and records group different data types.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
