Home >Backend Development >C#.Net Tutorial >What are the three types of identifiers in C language?
C language identifiers include keywords, user identifiers, and predefined identifiers. The C language stipulates that identifiers can only be composed of letters, numbers, and underscores, and the first character must be a letter or an underscore, not a number.
#Identifiers in C language can be divided into three categories: keywords, user identifiers, and predefined identifiers.
(Learning video sharing: java video tutorial)
C language stipulates that identifiers can only consist of letters (A~Z, a~z), It consists of numbers (0~9) and underscores (_), and the first character must be a letter or an underscore, not a number.
You must also pay attention to the following points when using identifiers:
1. Although the C language does not limit the length of identifiers, it is restricted by different compilers and also by the operating system. limits. For example, a certain compiler stipulates that the first 128 bits of an identifier are valid. When the first 128 bits of two identifiers are the same, they are considered to be the same identifier.
2. In identifiers, there is a difference between upper and lower case. For example, BOOK and book are two different identifiers.
3. Although identifiers can be defined arbitrarily by programmers, identifiers are symbols used to identify a certain quantity. Therefore, the naming should have corresponding meanings as much as possible to facilitate reading and understanding, and achieve "as the name implies" ".
Related recommendations: C language tutorial
The above is the detailed content of What are the three types of identifiers in C language?. For more information, please follow other related articles on the PHP Chinese website!