KEYWORDS OR RESERVED WORDS:
- Words that are used for Special purpose by the language.
- These are always written in lowercase.
- These have predefined uses and can’t be used for any other purpose in C Language.
- C has 32 Keywords
- (e.g.) Main (Indicate Main( ) function, we can’t use main for any other purpose).
Constants are quantities whose values do not change during program execution.
Types of Constants:
Two types of constant are
- Numeric Constant
- Integer Constant (0, 245, -4759, +4595)
- Floating-point Constant (25.5, 0.49, 245.463)
- Character Constant (M, s, 5, +, – , * )
- Value of Variable may change during program execution.
- Variable represents memory location.
- Data stored into the memory location.
- May be Numeric or a non-numeric value.
Rules for Writing Variable Names:
- Must be starting with Alphabetic Character or an underscore ( _ ).
- First character cannot be a digit.
- Spaces are not allowed in variable name
- Special character are not allowed (#,^,&,* , %, }, etc)
- Reserved words cannot be used.
- Maximum length is up to 31 characters.
- Two variables can not contain same name.
Types of Variables: