do we have the data type "float" ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

do we have the data type "float" ?

3rd Aug 2016, 7:21 PM
Manjusha Vvpb
Manjusha Vvpb - avatar
4 Answers
+ 5
yes, float variable_name = 0.0f;
3rd Aug 2016, 7:24 PM
James
James - avatar
+ 1
yes
5th Aug 2016, 12:55 PM
Rohit Singh
Rohit Singh - avatar
+ 1
yes
31st Jul 2017, 4:42 PM
Priyanka Patro
Priyanka Patro - avatar
- 1
yeah float is a data. Dont confuse it with double. Double is for both int as well as float except length of int must not be small like 123 or 12, it should be 12345678 etc. float var= 2.12f double var1= 12344557 or 22.44 int var2= 2 or 12 or 125
6th Aug 2016, 6:55 AM
Diwakar Joshi
Diwakar Joshi - avatar