Professional Documents
Culture Documents
Operators AND EXPRESSIONS
Operators AND EXPRESSIONS
C language supports different types of operators, which can be used with variables and constants
To form expressions. These operators can be categorized into the following major groups:
Σ Arithmetic operators Σ Relational operators
Σ Equality operators Σ Logical operators
Σ Unary operators Σ Conditional operator
Σ Bitwise operators Σ Assignment operators
Σ Comma operator Σ Size of operator
We will now discuss all these
Arithmetic Operators
Consider three variables declared as,
int a=9, b=3, result;
We will use these variables to explain arithmetic operators. Table 1.7 shows the arithmetic operators,
Their syntax, and usage in C language.
Relational Operators
A relational operator, also known as a comparison operator, is an operator that compares two
Values or expressions. Relational operators return true or false value, depending on whether the
Conditional relationship between the two
Operands holds or not.