Saturday, December 13, 2008

Rules for constructing Integer Constants

1. An integer constants must have at least one digit.
2. It must not have a decimal point.
3. It could be either +ve or –ve.
4. If no sign precedes an integer constants it is assumed to be positive.

5. No commas or blanks are allowed within an integer constants.
6. The allowable range for integer constants is –32768 to 32767.
The range of integer constants depends upon the word size of the computer. For 16-bit computers the would be –32768 to +32767, and for a 32-bit computer the range would be much larger.
Ex:
458
+892
-5326
-5762

No comments:

Post a Comment

Please give your valuable comments or queries if you fell its helpful or if you like the contents of the site. Thanks...