Computer Science Pathway EOPA Practice Test

Access More Questions
Which data type stores a sequence of characters?
Correct Answer:
String
Explanation:
A string stores a sequence of characters. In programming, strings are the data type designed specifically for text, holding characters in order—think of values like "Hello" or "abc123." They’re treated as text data and come with operations such as getting length, concatenating with another string, or extracting substrings. An array can hold a sequence of elements, and a character array is a specific form of that, but the data type used to represent text itself is the string. A constant is simply a value that doesn’t change once set, not a container for text. A field is a storage location inside a structure or object, which may hold text, but it’s not the data type that represents a sequence of characters. So the string is the right choice for storing a sequence of characters.

Access more questions from this quiz

Continue to Computer Science Pathway EOPA Practice Test for more practice questions and the full quiz experience.

Access More Questions