time()) die(); ?> AP CS
Loading
notes intro/old submit AP Problems the dump links
 

Quiz 6 - Primitive Data and operators

were YOU paying attention?

 

id:

1. The following are all on the AP except:

int char double boolean

2. True or false: if one of the operands (numbers) are integers than the output will be an integer true false

3. True or false: 5%2 = 1 true false

4. Evaluate the following:3%6+2

8 4 5 2.5 2

 

5. Evaluate the following:(1+2.0)/4-3

-3 3.0 3 -2.25 -3.75

 

6. Evaluate the following: double k=3/4;

.75 0 1 0.0 14

 

7. If you saw a variable INCHESINFOOT, you would assume

that the variable is a constant

that the variable is a class

that the variable is fine and can be accessed and changed like any other variable

that the programmer used bad programming style. it should just be 12;

that the programmer used bad programming style. it should be inchesInFoot