Given the variable definitions in this section, explain what conversions take place in the following expressions
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:4| Question number:34
All Answers
total answers (1)
(a)
`fval`
is converted to`bool`
.(b)
`ival`
is converted to`float`
, then added to`fval`
, finally the result is converted to`double`
.(c)
`cval`
is promoted to`int`
, then multiplied by`ival`
, then the result is converted to`double`
, then added to`dval`
.