C Integer Constant



Rules for constructing Integer constant:-

NoRuleInteger
1DecimalPoint Not Allowed
2SignPositive or Negative
3Default SignPositive
4No of DigitsAt least 1
5Min Value-32768
6Max Value+32767


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 :-

  1. Whole Numbers
  2. Real Numbers i.e 10,-10,0
C Integer Constant  C Integer Constant Reviewed by ANAND PANDEY on 7:58:00 AM Rating: 5

No comments:

Created By Anand Pandey. Powered by Blogger.