Department of Engineering

IT Services

Identifiers & declarations

Identifiers are a sequence of letters, digits and underscores starting with a letter, and with no restriction on length. They are used to give a name to a user-defined object, e.g. variable, struct, function, etc. Every name in a C++ program must be declared before it is used. int v1, v2; in the program above declares two integer variables with identifiers v1 and v2.