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