click below
click below
Normal Size Small Size show me how
LHS_COMPSCI
| Question | Answer |
|---|---|
| What is the output of the code below? int x = 7; x++; System.out.print(x); | 8 |
| What is the output of the code below? int x = 8; x = x % 3; System.out.print(x); | 2 |
| What is the output of the code below? int x = 9; x = x - 1; System.out.print(x); | 8 |
| What is the output of the code below? int x = 9 x = x + 3 * 2; System.out.print(x); | 15 |
| What is the output of the code below? int x = 9; x = x + 5; System.out.print(x); | 14 |
| What is the output of the code below? int x = 9; y = 8; int z = x + y; double a = z; System.out.print(a); | 17.0 |
| What is the output of the code below? System.out.print(4%3); | 1 |
| What is the output of the code below? System.out.print( ( double ) 2 / 2 ); | 0.0 |
| What is the output of the code below? System.out.print( ( int ) 9.6 ); | 9 |
| What is the output of the code below? double x = 9.0; x =x + 2; System.out.print(x); | 11.0 |