Question 1 Report
Which of the following data types is used to represent textual data in computers?
Programming languages classify data into different types depending on the kind of value being stored, because each type is stored and processed differently in memory. A string is the data type used to hold text, such as letters, words, and sentences, stored as a sequence of characters.
The other data types listed each hold a different kind of value: a float stores numbers with a decimal point, such as \( 3.14 \); an integer stores whole numbers with no decimal part, such as \( 25 \); and a Boolean stores only one of two logical values, true or false. None of these is designed to hold ordinary written text. Because textual data consists of characters rather than numeric or logical values, it is represented using the string data type.
Examination reminder: match the data type to what the value actually looks like: letters and words point to string, whole numbers to integer, decimal numbers to float, and true/false to Boolean.
Everything you need to excel in your exams