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

Prepare for the EOY8 Computer Science Exam. Enhance your skills with interactive quizzes and detailed explanations to ensure success. Start your journey to achieve great results!

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