Home >Backend Development >C#.Net Tutorial >What are the naming rules for user identifiers in C language
The naming rules for user identifiers in C language are: 1. User identifiers must start with the letters a~z, A~Z or an underscore; 2. User identifiers are case-sensitive; 3. C language Keywords in have special meaning and cannot be used as identifiers.
User identifiers in C language should generally follow the following naming rules:
(Recommended learning: C Language Tutorial)
1. The identifier must start with the letters a~z, A~Z or an underscore, and can be followed by any number (can be 0) characters. These characters can be letters, underscores, numbers, and other characters. It is not allowed to appear in the identifier;
2. Identifiers are case-sensitive;
3. The length of the identifier, c89 stipulates that it should be within 31 characters, and c99 stipulates that it should be within 63 characters;
4. Keywords in C language have special meanings and cannot be used as identifiers;
5. It is best to use a string with a certain meaning for a custom identifier to facilitate memory and understanding.
The above is the detailed content of What are the naming rules for user identifiers in C language. For more information, please follow other related articles on the PHP Chinese website!