Thad Smith said:
C compares values. The two constants have the same value when compared.
Well, they have different types. Specifically, 3 is of type int, and
3.0 is of type double. The standard specifies rules for converting
operands of "==" to a common type. In this case, the value 3 is
converted from int to double, and the result if this conversion is
compared to 3.0. Converting the int value 3 to double will almost
certainly yield the value 3.0, though I don't think the standard
quite guarantees it.