What is a float value

Recommended Answers

All 2 Replies

A float value is a data type that stores decimals.i.e. numbers that have decimal points e.g 78.90,1.50,4.89,etc.
An example of declaring a float value is this:
float number=0.0;

When initialising float variables, it's good to use 0.0(not that it's compulsory,anyway).

Hope this helped!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.