The Guide To Keywords In C – Learn Constants in C
The Comprehensive Guide To Constants In C
C Character Set:
- A character denotes any alphabet, digit or special symbol used to represent numbers and special characters allowed in C.
- Alphabets: A B C,….. Z a,b,c……z
- Numeric Digits:0,1,2,3,4,5,6,7,8,9
Special Characters:[su_table responsive=”yes” fixed=”yes”]
Constants in C:
- Constants represent fixed values. That means their value will not change in the program.
- An integer constant must have at least one digit.
- It must not have any decimal point.
EX:50 +890 -9609
- Real constants are often called Floating-point constants.
- Real constants must have at least one digit.
- It must have a decimal point.
- It could be either positive or negative.
EX:+564.98 890.0 -65.987 +3.2e-5
- A character constant is a single alphabet, a single digit or a single special symbol.
EX:'N' 'S' 'Navtutorials'
Keywords in C:
- Keywords cannot be used as variables.
Identifiers In C:
- The first character must be an alphabet or underscore.
- Must consist of only letters, digits or underscore.
- It cannot be used as a keyword.
- Must not contain white space
Variables in C:
- Variable is a data name that may be used to store a data value.
- Variable may take different values at different times during execution.
EX: counter avg total Invalid: 985 *