"Keywords" are words that have special meaning to the C compiler.Keywords are also called Reserved words.
Following are the keywords of C language
32 keyword's in C language
Variables
A Variable is a meaningful name of data storage location in computer memory. When using a variable you refer to memory address of computer.
Rules for writing variables
- Variable names can consist of:
- Letters
- Digits
- Underscores
- Variable names cannot start with a digit. Example: "3integers" is illegal
- Variable names should not start with an underscore.
Example: Avoid the use of variable names like "_number" - Variable names should consist of 31 or fewer characters to ensure portability.
- Variable names should be descriptive of their use.
Example: "grade" would be a good name to use for a variable that stores
a student's test grade. - Variable names are case sensitive.
Example: "x1" is not the same as "X1" - Keywords such as "int" and "float" cannot be used as variable names.
Constants
A "constant" is a number, character, or character string that can be used as a value in a program. Use constants to represent floating-point, integer, enumeration, or character values that cannot be modified.
or
A constant is an entity that doesn't change during the execution of a program.
There are four categories of constants in C:
- Integer constants (such as
63
,0
, and42L
) - Floating-point constants (such as
1.2
,0.00
, and77E+2
) - Character constants (such as
'A'
,'0'
, andL'\n'
) - Enumeration constants (such as
enum boolean { NO, YES };
), whereNO
andYES
are the enumeration constants