Prepare for the A Level Computer Science OCR Exam with comprehensive quizzes that cover essential topics, flashcards, and detailed explanations to help you excel. Ace your exam with confidence!

Practice this question and more.


Which of the following is NOT considered a primitive data type?

  1. Integer

  2. Real

  3. Array

  4. Boolean

The correct answer is: Array

In programming, primitive data types are the most basic data types that represent single values and are not composed of other types. These typically include types such as Integer, Real (or Float), and Boolean, which correspond to numeric and logical values that can be directly manipulated. Arrays, on the other hand, are considered a composite or complex data type because they are collections of elements, typically of the same data type. They allow for storing multiple values in a single variable, which makes them fundamentally different from primitive data types. While arrays are built from primitive types, their structure and functionality elevate them above being a basic data type. Thus, identifying the array as the option that is NOT a primitive data type aligns with the understanding of data types and their classifications in programming.