Increment Operator Evaluation
Consider the following code segment.
int x = 3;
int y = x++ + ++x + x;
System.out.println(y);
What is printed when this code segment is executed?
A
15
B
12
C
13
D
14
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | 24uds053 | 1 | 1 | 0m 27s | 73 |
| #2 | dilip | 0 | 1 | 0m 00s | -10 |
| #3 | theofanusmischa | 0 | 1 | 1m 22s | -92 |
Items per page:
10
1 – 3 of 3
