Tuesday, September 8, 2020

What is real/floating point constant? Syntax and rules for constructing

 Real constants:

Real constant are often called floating point constant.

The real constant could be written in two forms, fraction form & exponential from.

Real for constructing real constant in exponential form are as:

1] A real constant must have at least one digit.

2] It must havedigital point.

3] The mentissa part and the exponential should be separated by letter " e " or E .

3] It must could be +ve or -ve default sign is +ve.

4] No commas or blank space are allowed within real constant.

5] Ex: +325.34, 10.0, -326.4, -48.5697

The exponential form of representation of real real constant is usually used when the value of the constant is either too small or too large.

In exponential forma real constant is reprented in to two parts.

The part appearing before " e " is called mantissa, where as the part following " e " is called exponent.

 rules for constructing real constant.

1) The mentissa part and the exponential part should be separated by letter " e " or "E".

2) The mentissa part may have +ve or -ve sign,default sign is +ve.

3) Exponent must have at least one digit, which must be +ve or -ve , default sign is +ve.

4) Range of real constant in exponentiation is -3.4e38 to 3.4e38

5) Ex: 3.2e-5, 4.1e8, -0.2E+3, -3.2e-5.


1 comment:

Object Paradigm Oriented Programming in C++ / object oriented programming / History of C++/ paradiagram in c++/C devolop, Operating System, Unix operating system, Assembly language, popular in world, Programming language.

  Object Paradigm Oriented Programming  Two programmers, Brian Kernighan and Dennis Ritchie developed a new language called C, in 1972.  C l...