Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
All variables, methods, and classes in an application must be provided with a name to identify them, but what makes a valid variable name?
A variable name is one type of identifier. An identifier is simply a name that uniquely identifies an element such as a variable, custom data type, or function in the source code that makes up an application. In C, identifiers can consist of any sequence of letters, digits, or underscores. They can’t start with a digit, however, and those that start with an underscore are reserved for internal use by the compiler or support libraries. Identifiers can be of any length but are case sensitive, so fooBar, FOOBAR, and FooBar are all valid identifiers that refer to different items in an application.