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

Quiz 6c - Conversions

were YOU paying attention?



1. What would the value of i be: double i = (double)(9);

i=9.0 i=9 i=0 compile error

2. True or false: Widening conversion could be done by assignment (double k=9) or casting (double k=(double)9 )or by arithmetic promotion (27/3.0). true false

3. True or false: narrowing conversions can only happen by assignment (double k=9). true false

4. What would the following expression be equal to: (int)(9.0/2*2);

9 9.0 2 2.0 none of the above