Prepare for the A Level Computer Science OCR Exam with engaging quizzes, detailed explanations, and effective study tips. Maximize your readiness and boost your confidence for exam day!

Practice this question and more.


Which of the following descriptions best fits a 'string'?

  1. A collection of integer values

  2. A format for binary data

  3. A sequence of characters, forming words or sentences

  4. A method for logical comparisons

The correct answer is: A sequence of characters, forming words or sentences

A string is defined as a sequence of characters used to represent text. This can include letters, numbers, symbols, and even whitespace. When we describe a string as forming words or sentences, we acknowledge its role in handling textual data within programming and data structures. This definition distinguishes strings from other data types. For instance, collections of integer values would pertain to data types such as arrays or lists, which handle numerical data. A format for binary data might refer to how binary sequences are structured, such as in files or communication protocols, but does not relate to character sequences. Lastly, methods for logical comparisons are typically associated with boolean data types and operations, rather than textual representation. Because strings are fundamental in programming for displaying text and interacting with users, they are crucial for tasks that involve textual data manipulation, making the description as a sequence of characters the most accurate among the options provided.