In C, the names of variables, arrays, functions, labels and various user defined items are called identifiers.
The variables, arrays, functions, etc. can be identified by giving them meaningful names.
These names are called identifiers
RULES FOR IDENTIFIERS
- The first character of an identifier must be an alphabet or an underscore
- Identifiers must consist of only alphabets, digits or underscore
- Special symbos are not allowed
- Keywords should not be used as the identifiers
- Identifier should be a single word, i.e., No blank space is allowed
- Identifiers can be both uppercase and lowercase. C is case sensitive, i.e., uppercase letters are different from lowercase letters
e.g : ADD , AdD, add are different identifiers
Valid Identifiers Invalid Identifiers ADD 3add Numerics not allowed in the beginning Add add+123 + is not allowed _add for it is a keyword Student_Name ABC XYZ Blank not allowed Name Student%123 % Is not allowed A312B _Add*5Add * is not allowed
No comments:
Post a Comment