Like every other language 'C' also has its own character set. A program is a set of instructions that when executed, generate an output. The data that is processed by a program consists of various characters and symbols. The output generated is also a combination of characters and symbols.
In C language characters are grouped into the following catagories,
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:
| Character | Known as | Character | Known as |
|---|---|---|---|
| , | comma | . | period |
| ; | semi-colon | : | colon |
| ? | question mark | ' | apostrophe |
| " | double quotation mark | ! | exclamation mark |
| / | forward slash | \ | backward slash |
| | | vertical bar | ~ | tilde |
| _ | underscore | $ | dollar sign |
| % | percentage sign | & | ampersand |
| ^ | caret | # | hash sign |
| + | addition | - | subtraction |
| * | multiplication | / | division |
| > | greater than or closing angle bracket | < | less than or opening angle bracket |
| { | opening curly bracket | } | closing curly bracket |
| [ | left bracket | ] | right bracket |
| ( | opening left parenthesis | ) | closing right parenthesis |
Each and every smallest individual units in a C program are known as C tokens.C tokens are the basic buildings blocks in C language which are constructed together to write a C program.
C tokens are of six types. They are,
| Token Type | Example |
|---|---|
| KEYWORDS | int, while |
| IDENTIFIERS | main, total |
| CONSTANTS | 10, 20 |
| STRINGS | “total”, “hello” |
| OPERATORS | (), {} |
| SPECIAL CHARACTERS | +, /,-,* |