UMBC CMSC 201
Fall '06

CSEE | 201 | 201 F'06 | lectures | news | help

Keywords in C

Most programming languages have a set of keywords that have a special meaning and should not be used as names of variables or functions that you create. C's key words are:
auto break case char const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while


Legal identifiers in C

An identifier in a programming language is a name used for a variable or function or datatype.

Identifiers in C may be composed of letters, digits, and underscores. They may NOT be a keyword, or begin with a digit.

In C, the case of a character matters, so FOO, Foo and foo are all distinct identifiers.

A common programming convention is to use a change in case to "break up" a long identifier to suggest its meaning to a human reader, as in averageAge and ageInYears.

The underscore character can be used to do this also, as in average_age and age_in_years.


CSEE | 201 | 201 F'06 | lectures | news | help