1. Which one of the following is NOT a correct arithmetic expression?
2. What is an operand?
3. Assume the following declarations:
short a=12 ; int b=33 ; float x = 2.3; double y = 3.14;
Which one of the following expressions will NOT be evaluated using double precision floating point?
4. What does the following program output?
class question4 { public static void main ( String[] args ) { int totalCost = 6; int items = 12; System.out.println("cost per item: " + totalCost/items ); } }
5. What is the result of evaluating the following expression?
( 1/2 + 3.5) * 2.0
6. What is the result of evaluating the following expression?
-32 / 6
7. What is an expression?
8. Given the following expression:
(a - x)/(13 - z)
Which of the following is NOT a subexpression?
9. What is the value of
-32 % 6
10. Which of the following declarations works for the constant pi (assume that the numerical value is correct)?
The number you got right: Percent Correct: Letter Grade: