C Integer Constant

Rules for constructing Integer constant

1DecimalPoint Not Allowed
2SignPositive or Negative
3Default SignPositive
4No of DigitsAt least 1
5Min Value-32768
6Max 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


Examples of integer constants :

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