Showing posts with label Real constants. Show all posts
Showing posts with label Real constants. Show all posts

Wednesday, May 14, 2008

Real constants

Real constants

Real constants are often called Floating Point constants.

It has three parts:

1. A sign (+ or -) preceding the number portion (optional).

2. A number portion (representing the base).

3. An exponent portion following the number portion (optional). This starts with E or E followed by an integer. The integer may be preceded by a sign.

A real constant must have at least one digit. It must have a decimal point. It could be either positive (default) or negative. No commas and blank are allowed within a real constant.

Some example of real constants:

: +.72
: +72
: +7.6E+2
: 24.4e-5

Copyright

Copyright © 2008 C Tutorial, All rights are reserved