click below
click below
Normal Size Small Size show me how
LHS_COMPSCI
Question | Answer |
---|---|
41. What is the output by the code below? int x = 20; x++ System.out.print(x); | 8 |
42.What is the output by the code below? int x = 8; x = x%3; System.out.print(x); | 2 |
43. What is the output by the code below? int x = 9; x = x-1; System.out.print(x); | 8 |
44. What is the output by the code below? int x = 9; x = x+3*2; System.out.print(x); | 15 |
45. What is the output by the code below? int x = 9; x = x+5; System.out.print(x); | 14 |
46. What is the output by the code below? int x = 9; y = 8; int z = x+y; double a = z; System.out.print(a); | 17.0 |
47. What is the output by the code below? System.out.print(4%3); | 1 |
48. What is the output by the code below? System.out.print((double)2/2); | 1.0 |
49. What is the output by the code below? System.out.print((int)9.6); | 9 |
50. What is the output by the code below? double x = 9.0; x = x+2; System.out.print(x); | 11.0 |