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

Quiz 6b - Conversions

do you need to pay attention?

 

id:

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

i=9.0 i=9 i=0 compile error

2. True or false: widening conversions are much safer than narrowing conversions because they do not lose data. true false

3. True or false: narrowing conversions can only happen by casting. true false

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

9 9.0 2 2.0 none of the above