Which of the following assignment statements is correct to assign character 5 to c?
A. char c = "344";
B. char c = 5;
C. char c = "5";
D. char c = '5';
查看答案
Note that the Unicode for character A is 65. The expression 'A' + 1 evaluates to ________.
A1
B
C. Illegal expression
D. 66
Assume that the ASCII code for character c is 99 and for a is 97. What is the printout of the following code? System.out.println('a' + 'c');
A. 9799
B. a99
C. ac
D. 196
The expression 'c' - 'e' is ________________.
A. a random number
B. invalid
C. 2
D. -2
Will System.out.println((char)4) display 4?
A. No
B. Yes