Floating point variables in turbo c

Asked By 0 points N/A Posted on -

How many bytes are stored in float type?please identify the term Floating Point Variables

Best Answer by Kerstone vertile
Answered By 0 points N/A #123015

Floating point variables in turbo c



Floating point numbers are stored in four bytes of Float type.Three bytes are stored for the values of numbers and remaining one byte is stored for the exponent.
Floating Point Variables are different from other variables such as char and int.Floating Point Variables are stored in two parts in the memory.The first part is the mantissa ,mantissa is the value of number and second part is the exponent,exponent is the power of the value.
The exponent may be with negative sign with it .
An example how to use floating point is as follow:
void main(void)
float height=10.5;
printf("the height of wall is %f",height);
this is the correct way how we use float type in our program.
Best Answer
Best Answer
Answered By 0 points N/A #123017

Floating point variables in turbo c


Float can store four bytes.It is used to store floating type variables by floating we mean they must contain decimal numbers.So the 5.0 is a floating point number while 5 is integer.

Floating point variables:

In c++ to store decimal numbers data type float is used which can store four bytes,By the term floating point variables we mean the variable storing the decimal value.

For Example:

float   variable =1.05;

The table below can give you more clear concept of float.

Data type                Bytes        Decimal places    Range  of values

float                          4                        6                3.4E -38 to3.4E+38
double                      8                        15               1.7E – 308 to1.7E +308
long double              10                      19               3.4E -4932 to 304E +4932


Login/Register to Answer

Related Questions