Which data type matches the string literal "True" used as text?

Study for the End of Year 8 Computer Science Test. Prepare with flashcards and multiple choice questions, each with hints and explanations. Get ready for your exam!

Multiple Choice

Which data type matches the string literal "True" used as text?

Explanation:
String is used for text values. The quotes around True show it’s a sequence of characters, not a value to be treated as true/false or a number. Without quotes, True could be a boolean in some languages, but with the quotes, it’s literally text. Numbers (integers) need digits, and floats need digits with a decimal point, so they don’t fit the string "True."

String is used for text values. The quotes around True show it’s a sequence of characters, not a value to be treated as true/false or a number. Without quotes, True could be a boolean in some languages, but with the quotes, it’s literally text. Numbers (integers) need digits, and floats need digits with a decimal point, so they don’t fit the string "True."

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy