2.7: The Char Data Type

24 July 2022
4.7 (114 reviews)
8 test answers

Unlock all answers in this set

Unlock answers (4)
question
Write a character literal representing the (upper case) letter A.
answer
'A'
question
Write a character literal representing a comma.
answer
','
question
Write a character literal representing the digit 1.
answer
'1'
question
Write a literal representing the character whose ASCII value is 65.
answer
'A'
question
Write a literal representing the largest character value . Suppose we are using unsigned one-byte characters .
answer
255
question
Declare a character variable named c.
answer
char c;
question
How many bytes are needed to store: 'n' ? How many bytes are needed to store: "n" ? How many bytes are needed to store: 'n' ? How many bytes are needed to store: "n", ?
answer
1 2 1 2
question
What's the difference in UNICODE value between 'E' and 'A'? (consult a table of UNICODE values): What's the difference in UNICODE value between 'e' and 'a'? (consult a table of UNICODE values): What's the difference in UNICODE value between '3' and '0'? (consult a table of UNICODE values): What's the difference in UNICODE value between '6' and '0'? (consult a table of UNICODE values):
answer
4 4 3 6