What are the identifiers in C language?

云罗郡主
Release: 2020-09-07 14:57:58
Original
167203 people have browsed it

What are the identifiers in C language?

What are the c language identifiers?

Identifiers can only be letters (A~Z, a~ z), numbers (0 to 9), and underscores (), and the first character must be a letter or underscore. For example, correct identifiers: abc, a1, prog_to. In C language, identifiers are divided into three categories: keywords, predefined identifiers, and user-defined identifiers. [Recommended tutorial:C video tutorial]

What are the identifiers in C language?

Note on identifiers in C language:

cannot be used C language keywords are used as user identifiers, such as if, for, while, etc.

The length of the identifier is determined by the compilation system on the machine. The general limit is 8 characters (Note: The 8-character length limit is The C89 standard and the C99 standard have expanded the length. In fact, most industry standards are longer).

Identifiers are case-sensitive, that is, they are strictly case-sensitive. Generally use lowercase for variable names and uppercase for symbolic constants.

Identifier naming should be so that "the meaning is known by the name", for example, length (foreign language: length), sum, total (foreign language: sum), pi (foreign language: pi)...

The above is the detailed content of What are the identifiers in C language?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!