C Tokens
Each and every smallest individual unit in C programming is known as C tokens OR each and every term used in C programming is called C Tokens
In other words, the symbols, words, numbers, etc. which are used in writing a C program are known as C tokens.
For example - void, {, printf, main, 34, etc.
In C programming C tokens are divided into six below listed categories/groups.
- Keywords [eg: int, while]
- Identifiers [eg: main, total]
- Constants [eg: 10, 20]
- Strings [eg: “total”, “hello”]
- Special symbols [eg: (), {}]
- Operators [eg: +, /,-,*]
Note: You will study all C Tokens in detail in upcoming chapters.
Example
Example Explanation
In above example, used C Tokens are..
- Keywords → int
- Identifiers → main, a, b, result
- Delimiter → {,}, (,)
- Operators → +
Note: combinedly int, main, a, b, result, {,}, (,), + are called C Tokens.