当前位置:网站首页>When initializing 'float', what is the difference between converting to 'float' and adding 'f' as a suffix?

When initializing 'float', what is the difference between converting to 'float' and adding 'f' as a suffix?

2022-07-07 11:01:00 Zafo

problem :

What is the difference between What's the difference?

float f = (float) 99.32 ;

and and

float f = 99.32f ;

Both of them compiled and ran successfully. They all compiled successfully and ran successfully .


Solution :

Reference resources : https://stackoom.com/en/question/2F9PY
原网站

版权声明
本文为[Zafo]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130620541406.html