🧭 Navigation
⬅️ Previous | 🏠 Home | ➡️ Next
In C programming, tokens are the smallest units of a program that have meaning to the compiler.
They are the building blocks for writing C programs.
-
Keywords
Reserved words with special meaning.
Example:int,return,if,while -
Identifiers
Names given to variables, functions, etc.
Example:main,count,sum -
Constants
Fixed values that do not change during program execution.
Example:10,3.14,'A' -
String Literals
Sequence of characters enclosed in double quotes.
Example:"Hello, World!" -
Operators
Symbols that perform operations on variables and values.
Example:+,-,*,/,= -
Separators (Punctuators)
Characters that separate tokens.
Example:;,,,(),{}
int sum = 10; // 'int' (keyword), 'sum' (identifier), '=' (operator), '10' (constant), ';' (separator)
printf("Hello, World!"); // 'printf' (identifier), '(' and ')' (separators), '"Hello, World!"' (string literal), ';' (separator)Tokens are fundamental to understanding how C programs are structured and interpreted by the compiler.
| ⬅️ Previous | 🏠 Home | ➡️ Next |
|---|---|---|
| Basic Structure | README | Identifiers & Variables |
🧭 Navigation
⬅️ Previous | 🏠 Home | ➡️ Next