Select the options that, when inserted at // INSERT CODE HERE, will make the following code output a value of 11:
public class Main { public static void main(String[] args) { int ctr = 30; // INSERT CODE HERE System.out.println(ctr % 20); } }
A, C
To output a value of 11, the value of the variable ctr should be 31.
B is incorrect. Java does not define a =+ operator.
The correct operator is +=.
D is incorrect because it's assigning a value of 1 to the variable result, the result would be 1.