DEV Community

Tokens in the C language

221910301048 on May 19, 2021

The individual elements of a program are called Tokens. In a C program, a number of individual units or elements occur. These elements are called C...
Collapse
 
pauljlucas profile image
Paul J. Lucas

An identifier is a variable that holds a value and stores it in the memory.

No. An identifier is any token that matches the [_A-Za-z][_A-Za-z0-9]* regular expression and not all identifiers are variables: function names, macro names, and constant names are all identifiers.

Your rules for variables are also wrong in too many ways to list.