Correct Answer : B
Inside main
, 3 variables of type float
, double
and int
are declared and initialized. The first if
condition checks whether f == d
. For comparision to be done, as f
and d
are of different types (but compatible), implicit typecasting is done. float
will be expanded to double
and comparision is done. Then f == d
means 75.0 == 75.0
. This is true
. So if
block is executed. Next statement is another if
having f == i
. Here also int
is expanded to float
and compared
. So this equality check returns true
and display statement prints f, d and i are equal.