C Token – Operators
Operators are symbols that trigger an action when applied to C variables and other objects. The data items on which operators act are called operands.
Depending on the number of operands that an operator can act upon, operators can be classified as follows:
- Unary Operators: Those operators that require only a single operand to act upon are known as unary operators.For Example increment and decrement operators
- Binary Operators: Those operators that require two operands to act upon are called binary operators. Binary operators can further are classified into:
- Arithmetic operators
- Relational Operators
- Logical Operators
- Assignment Operators
- Bitwise Operator
- Ternary Operator: The operator that requires three operands to act upon is called the ternary operator. Conditional Operator(?) is also called the ternary operator.
This article is contributed by I.HARISH KUMAR.
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.