Tokens in C


Tokens in C

A token is an identifier, a keyword, a string literal, a constant, or a symbol, in a C program.

Identifiers

A C identifier is a name that is used to refer to a function, variable, or any other user-defined entity. An identifier begins with a letter from A to Z, a to z, or an underscore '_', then zero or more letters, underscores, or numbers (0 to 9).

Within identifiers, punctuation characters like @, $, and percent are not allowed. The computer language C is case-sensitive. As a result, in C, Manpower and manpower are two distinct identifiers.

Keywords

Here is a list showing reserved words in C. These reserved words may not be used as constants or variables or any other identifier names.

Whitespace in C

A blank line is a line that has simply whitespace, potentially with a comment, and it is completely ignored by the C compiler.

Blanks, newline characters, tabs, and comments are all referred to as whitespace in C. Whitespace divides one section of a statement from the next, allowing the compiler to determine where one element, such as int, stops and the next begins.