+ ExplanationAs we know in c zero represents false and any non-zero number represents true. So in the above code:
(0.001 – 0.1f) is not zero so it represents true. So only if clause will execute and it will print: David Beckham on console.
But it is bad programming practice to write constant as a condition in if clause. Hence compiler will show a warning message: Condition is always true
Since condition is always true, so else clause will never execute. Program control cannot reach at else part. So compiler will show another warning message:
Unreachable code