Names
- Names in C must begin with a letter or underscore (
_
),
followed by zero or more letters, digits or underscores
- Names beginning with an underscore are usually reserved for use
by library routines
- C keywords (
while
, for
, do
, etc.)
are reserved and may not be used as variable names
- Traditionally, variable names are written using lower case and
preprocessor names are written using upper case
- Names can be of any length, but should be unique in the first 31 characters
- If a name is to be visible outside a given file (a library routine,
for example) the ANSI C standard only guarantees that the first 6 characters
will be used and that those may even be treated in a case-insensitive manner
Previous,
Next,
Index