Answer the question
In order to leave comments, you need to log in
Why is float initialized as double by default?
I read that when declaring a variable of type float, the value is stored in it as double, and in order to set the storage type as float, we use the letter f.
Why is it so? After all, float is a type smaller than double. That is, double occupies 8 bytes (minimum), and float 4 bytes (minimum), that is, we store a number in a larger representation type, in a smaller variable.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question