Floating-Point Numbers
Numbers with decimal parts are called floating-point numbers. Like integers, floating-point numbers can be both positive and negative.
For example, 32.9
, -56.5
, 9.0
, etc.
Important! Numbers like
9
, 5
, 28
, etc. are treated as integers by C. However, C treats 9.0
, 5.0
, 28.0
, etc. as floating-point numbers because we have put a decimal point in these numbers.