Variable Names

Here are two facts about variable names in C:

  1. A variable name can contain letters (upper- and lower-case), digits, and underscores (the `_' character).
  2. A variable name cannot start with a digit.

There are no restrictions on the length of C variable names. Let's look at some examples.

Keep in mind that C is case-sensitive. For example, C treats the names Epsilon and epsilon as two different names.


Eric N. Eide
Hamlet Project
Department of Computer Science
University of Utah