Home > Article > Backend Development > What are the three types of identifiers in C language?
#What are the three types of C language identifiers?
#Identifiers in C language are divided into three categories: keywords, predefined identifiers and user identifiers.
Keyword: cannot be used as user ID. main define scanf printf are not keywords. What confuses you is that If can be used as a user identifier. Because the first letter in If is capitalized, it is not a keyword.
Predefined identifiers: recite define scanf printf include. Remember that predefined identifiers can be used as user identifiers.
User identifier: An identifier defined by the user according to their own needs. Generally used to name variables, functions, arrays, etc. If the user identifier is the same as a keyword, an error will occur during compilation; if it is the same as a predefined identifier, no error will occur during compilation, but the original meaning of the predefined identifier will be lost or the result will be wrong, so predefined identifiers Generally not used as a user identifier.
Each process has an actual user identifier and an actual group identifier, which are always the user identifier and group identifier of the user who started the process.
The effective user identifier and effective group identifier of the process may be more important, they are used to determine whether a user can
access a certain file. Under normal circumstances, they are consistent with the actual user identifier and the actual group identifier.
However, a process or its ancestor process can set the set user identifier permission or set group identifier permission of the program file.
In this way, when the program is executed through an exec call, the effective user identifier of its process is taken from the
effective user identifier of the file owner of the file, rather than the one that started the process. The user's valid user identifier.
Recommended tutorial: "
C LanguageThe 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!