Character to Integer Type Casting
What is printed when the following program is executed?
public class Main {
public static void main(String[] args) {
char letter = 'C';
int result = letter;
System.out.println(result);
}
}
A
67
B
Compilation Error
C
Undefined
D
C
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | solsaloe | 1 | 2 | 0m 00s | 90 |
| #2 | ntgamja1 | 1 | 1 | 0m 36s | 64 |
| #3 | jaimonjosh | 1 | 1 | 0m 43s | 57 |
| #4 | richa.tuli | 1 | 2 | 1m 12s | 18 |
| #5 | srivastavarishit635 | 0 | 1 | 0m 33s | -43 |
| #6 | busemagngr | 0 | 3 | 0m 32s | -62 |
| #7 | lsj08030922 | 1 | 3 | 5m 56s | -276 |
Items per page:
10
1 – 7 of 7
