C Integer 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 :-
- 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
 C Integer Constant
![C Integer Constant]() Reviewed by ANAND PANDEY
        on 
        
7:58:00 AM
 
        Rating:
 
        Reviewed by ANAND PANDEY
        on 
        
7:58:00 AM
 
        Rating: 
      
No comments: