China Naming Network - Ziwei knowledge - 10, the following can be used as legal variable names ()

10, the following can be used as legal variable names ()

Choose a.

In C language, only letters, numbers and underscores can form variable names, and they must start with letters or underscores and cannot be the same as the specified keywords, so all words with spaces cannot be used, and English case can be used.

Legal variable names consist of letters, numbers and underscores. The first number can only be a letter or an underscore, and it cannot be exactly the same as the reserved words in C language. Register reserved words, us$ contains illegal characters, and the other three can.

Extended data:

(1) The variable name must start with a letter or an underscore, and the middle of the name can only consist of letters, numbers and the underscore "_"; The last character can be a type descriptor;

(2) The length of variable name shall not exceed 255 characters;

(3) Variable names must be unique within the valid range. Effective range is the range where a program can recognize and use reference variables-such as a procedure, a form, and so on. The range of reference variables will be introduced later.

Baidu Encyclopedia-Variable