Home  >  Article  >  Backend Development  >  Can identifiers in C language not have the same name as reserved words?

Can identifiers in C language not have the same name as reserved words?

烟雨青岚
烟雨青岚Original
2020-07-03 10:49:044863browse

Identifiers in C language cannot have the same name as reserved words. Reserved words are English words with special meanings in C language programs; reserved words have specific grammatical meanings and are not allowed to be redefined by users; keywords cannot be misspelled, nor can they be used as variable names or function names.

Can identifiers in C language not have the same name as reserved words?

#Identifiers in the C language cannot have the same name as reserved words.

Reserved words:

English words with special meanings in C language programs are called "reserved words", also known as "keywords". All composed of lowercase letters

Identifier:

A character sequence defined by the designer in the program, used to name objects that need to be identified in the program, symbolic constants, variables, arrays and Objects such as functions

Difference:

The identifier selected by the user cannot be a reserved word of the C language.

Identifier characteristics:

1. By letters , numbers, and underscores

2. The beginning must be a letter or an underscore

3. The length must not be greater than 32 characters, and usually the first 8 characters are valid

4. Divided into uppercase and lowercase letters

Recommended tutorial: "C Language"

The above is the detailed content of Can identifiers in C language not have the same name as reserved words?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn