Monday, August 17, 2020

4.1.2 Floating Point Types

  • Floating point data types have been defined to store decimal numbers. Floating point data types are of 2 types. 
  • In Float type you can store up to 7 digits after decimals. Double type can be stored up to 17 digits after decimals.

Data Type

Size (bytes)

Range

float

4

3.4E-38

to

3.4E+38

double

8

1.7E-308

to

1.7E+308


Example :-


/* A double type variable */ double balance=810.12354984;




No comments:

Post a Comment

Please do not any spam link in Comment Box