Integer Number Constant : Rules for Constructing Constant

Rules for constructing Integer constant

No Rule Integer
1 Decimal Point Not Allowed
2 Sign Positive or Negative
3 Default Sign Positive
4 No of Digits At least 1
5 Min Value -32768
6 Max Value +32767

Some important Tips :

  1. The range of the integer constant depends on the compiler. The above mentioned range is for 16-bit compiler.
  2. Integer Value does not have decimal point.
  3. Integer Value may be positive or negative. even 0 is also considered as Integer.
  4. Integer Constant Value is assigned to integer variable.
  5. Arithmetic Operations can be performed on Integer Value such as addition,subtraction,multiplication and division.
  6. 2 bytes in memory is allocated for Integer Value
integer_graph1-blue-yellow

integer_graph1-blue-yellow

Examples of integer constants :

  1. Whole Numbers
  2. Real Numbers i.e 10,-10,0