Which data type is used to store a single textual character?

Prepare for the CompTIA Tech+ Test with interactive quizzes and comprehensive questions, each with detailed explanations. Optimize your study time and ace the exam!

Multiple Choice

Which data type is used to store a single textual character?

Explanation:
When you need to store a single textual character, you use a data type that represents exactly one code point. This type is designed for exactly one character, not a sequence. That’s why it’s the right choice here. Strings, by contrast, are sequences of characters and can hold many characters—words or sentences. Booleans store true or false, and numeric types store numbers, not characters. In many languages this single-character type is called a char and it holds one code point from an encoding like ASCII or Unicode.

When you need to store a single textual character, you use a data type that represents exactly one code point. This type is designed for exactly one character, not a sequence. That’s why it’s the right choice here. Strings, by contrast, are sequences of characters and can hold many characters—words or sentences. Booleans store true or false, and numeric types store numbers, not characters. In many languages this single-character type is called a char and it holds one code point from an encoding like ASCII or Unicode.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy