Saturday, 5 October 2013

Overview of C Tokens


In a passage of text, individual words and punctuation marks are called tokens. Similarly, in a C program the smallest individual units are known as C tokens. C Tokens have been classified into 6 categories:

1.       Keywords (e.g. float, do, for, while etc.)

2.       Identifiers (e.g. salary, sum, amount etc.)

3.       Constants (e.g. 20.5, 100 etc.)

4.       Strings (e.g. “ABC”, “year”, “250” etc.)

5.       Special Symbols (e.g. [, ], {, }, % etc.)

6.       Operators (e.g. +, -, %, *, / etc.)

No comments:

Post a Comment