Home » C Programming » Floating Point Issues

What will you do to treat the constant 3.14 as a float?

Correct Answer: use 3.14f

Explanation:

Given 3.14 is a double constant.
To specify 3.14 as float, we have to add f to the 3.14. (i.e 3.14f)

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion