A character set in ‘C’ is divided into,
Letters Numbers Special characters White spaces (blank spaces)
A compiler always ignores the use of characters, but it is widely used for formatting the data. Following is the character set in ‘C’ programming:
- Letters
Uppercase characters (A-Z) Lowercase characters (a-z)
- Numbers
All the digits from 0 to 9
- White spaces
Blank space New line Carriage return Horizontal tab
- Special characters
Special characters in ‘C’ are shown in the given table,
Keywords and Identifiers
In ‘C’ every word can be either a keyword or an identifier. Keywords have fixed meanings, and the meaning cannot be changed. They act as a building block of a ‘C’ program. There are a total of 32 keywords in ‘C’. Keywords are written in lowercase letters. Following table represents the keywords in ‘C’- An identifier is nothing but a name assigned to an element in a program. Example, name of a variable, function, etc. Identifiers in C language are the user-defined names consisting of ‘C’ standard character set. As the name says, identifiers are used to identify a particular element in a program. Each identifier must have a unique name. Following rules must be followed for identifiers:
The first character must always be an alphabet or an underscore. It should be formed using only letters, numbers, or underscore. A keyword cannot be used as an identifier. It should not contain any whitespace character. The name must be meaningful.
Summary
C Tokens in C language are the smallest units in a program. A keyword is reserved words by language. There are total of 32 keywords. An identifier is used to identify elements of a program.