0

What f means in this code?

float x=12.7; x-=10.6; cout<<(x==2.1f)

11/12/2019 3:38:22 PM

Davron

2 Answers

New Answer

+7

'f' forces the number to be of type float. A value like 2.1 is of type double by default.

+2

2.1f =>means 2.1 of type float data. 2.1 =>means 2.1 of type double(default case). 2.1d =>means 2.1 of double data type.