C Token β Special Symbols
The following special symbols are used in C having some special meaning and thus, cannot be used for some other purpose. Some of these are listed below:
- Brackets[]: Opening and closing brackets are used as array element references. These indicate single and multidimensional subscripts.
- Parentheses(): These special symbols are used to indicate function calls and function parameters.
- Braces{}: These opening and ending curly braces mark the start and end of a block of code containing more than one executable statement.
- Comma (, ): It is used to separate more than one statement like for separating parameters in function calls.
- Colon(:): It is an operator that essentially invokes something called an initialization list.
- Semicolon(;): It is known as a statement terminator. It indicates the end of one logical entity. Thatβs why each individual statement must be ended with a semicolon.
- Asterisk (*): It is used to create a pointer variable and for the multiplication of variables.
- Assignment operator(=): It is used to assign values and for logical operation validation.
- Pre-processor (#): The preprocessor is a macro processor that is used automatically by the compiler to transform your program before actual compilation.
- Period (.): Used to access members of a structure or union.
- Tilde(~): Bitwise Oneβs Complement Operator.
Tokens in C
A token in C can be defined as the smallest individual element of the C programming language that is meaningful to the compiler. It is the basic component of a C program.