C Integer ConstantPritesh
Rules for constructing Integer constant
|1||Decimal||Point Not Allowed|
|2||Sign||Positive or Negative|
|4||No of Digits||At least 1|
Some important Tips :
- The range of the integer constant depends on the compiler. The above mentioned range is for 16-bit compiler.
- Integer Value does not have decimal point.
- Integer Value may be positive or negative. even 0 is also considered as Integer.
- Integer Constant Value is assigned to integer variable.
- Arithmetic Operations can be performed on Integer Value such as addition,subtraction,multiplication and division.
- 2 bytes in memory is allocated for Integer Value
Examples of integer constants :
- Whole Numbers
- Real Numbers i.e 10,-10,0