Identifiers in C
There are five rules to name C identifiers. They are:
- The first character must be an alphabet or underscore.
- Must consist of only letters, digits and underscore.
- Only the first 31 characters of an identifier are significant, others are ignored by the C compiler.
- A keyword cannot be used as an identifier.
- An identifier must not contain white spaces.
Examples of Valid C Identifiers:
_mark, mark1, Student_mark, ABCD123
Examples of Invalid C Identifiers:
123mark, student mark, $mark, int