float, double


for the number "3"

are floats always denoted by 3.0 (plus) f .... = 3.0f

are doubles always denoted by a single zero to the right of the decimal? 3.0

Without looking at the type can I assume from how its written (3.0 vs 3.0f) which is double and which is float -- is the added f always the case?
The type of a floating literal is double unless explicitly specified by a suffix.
The suffixes f and F specify float, the suffixes l and L specify long double. - IS
Topic archived. No new replies allowed.