Most programming languages have their own versions of the five primitive data types outlined below. For example, in Visual Basic, you can store decimal values in a Single or Double data type - these are just versions of the REAL primitive data type. In a theory exam, you would always answer with a primitive data type, not one that is specific to a programming language.
This is the most common data type, almost anything which has letters, numbers, symbols, punctuation, or a combination of all of these, can be stored as STRING
Examples: Surname = "Smith", Telephone Number = "07989123456", CarReg = "CF13 ABC", Message = "Please enter a number!"
This data type is used when you only want to store a single letter, or a digit which is not a number you would perform a calculation on.
Examples: Gender = "M", Gender = "F", Assessment Marker Effort = "2"
This is the simplest data type to use, when you only want to store a whole number (NOT a decimal). This number would usually be something you would perform a calculation on. As such, INTEGER would NOT be used for a telephone number.
Examples: NoOfCars = 65, NoOfSiblings = 2, NoInStock = 100
This data type is used to store decimal numbers.
Examples: TreeHeight = 1.2, Cost = 200.70, Average = 7.56
This is a special data type, which only has one of two values. The values are opposites and include the following only: Yes or No, True or False, 0 or 1, On or Off
Examples: Delivery = Yes, Smoker = No, RecordFound = True, Errorfound = False