Tokens are Building Blocks of C programming.
Token Definations
Keyword: A variable is meaningful of data storage in computer memory. when using a variable you refer to memory address of computer.
Constants:Constants are expressions with a fixed value.
Identifiers: The term identifier is usually used for variable name.
String: Sequence of characters.
Operators: A symbol that represent mathematical or non-mathematical operation.
Special symbols: Symbols other than alphabets digits and whites paces.
Token Example
| SNo | Token Type | Example1 | Example2 |
|---|---|---|---|
| 1 | keyword | for | switch |
| 2 | constants | number | Sum |
| 3 | Identifier | -120 | 14 |
| 4 | string | "abc" | "prni" |
| 5 | operators | ++ | -- |
| 6 | special symbols | * | @ |
Keywords of C programming language
- keywords already defined by compiler.
- Cannot be used as a variable name.
- There are 32 keywords in c.
- Those are also known as Reserved keywords.
32 keyword of c language
| auto | double | struct | int |
| break | else | long | switch |
| case | enum | register | typedef |
| char | extern | return | union |
| const | float | short | unsigned |
| continue | for | signed | void |
| default | goto | sizeof | volatile |
| do | if | static | while |

0 comments:
Post a Comment