Easy Multiple Choice QuestionsΒΆ

These problems are easier than most of those that you will usually see on the AP CS A exam.

3-9-1: What does the following code print?

System.out.println(2 % 3);





3-9-2: What does the following code print?

System.out.println(19 % 5);





3-9-3: What does the following code print?

System.out.println(1 / 3);






3-9-4: What does the following code print?

System.out.println(2 + 3 * 5 - 1);





3-9-5: Given the following code segment, what is the value of b when it finishes executing?

double a = 9.6982;
int b = 12;
b = (int) a;





3-9-6: Which of the following is the decimal value for the binary number 1001011?






3-9-7: How many bits would you need to represent 25 distinct values?




3-9-8: What is the hexadecimal equivalent of the following binary number: 110100?






3-9-9: What is the binary equivalent of the following base 10 number: 187?