Top
/
C++
/
Variables
/
Answer-variable-7
Answer to Question variable-7
x
= 0. Expression 1/3 does
integer division
, which always yields an integer (by throwing away everything to the right of the decimal point). Value 0 of 1/3 is
coerced
to type double, yielding 0.0.