The symbols (or tokens) that trigger computations in the program are called arithmetic operators. They are
These operators compare two quantities, that is, they determine the relation between two data. The result of the operation will be either TRUE (1) or FALSE (0).
|> greather than||6||3||6>3||TRUE|
|< less than||6||3||6<3||FALSE|
|>= Greather than or equal to||6||3||6>=3||TRUE|
|<= Less than or equal to||6||3||6<=3||FALSE|
|== equal to||6||3||6==3||FALSE|
|!= Not equal to||6||3||6!=3||TRUE|
Logical operators are used to combine relational expressions. The operands as well as the result of these operators are Boolean values (TRUE and / or FALSE). The logical AND (&&), Logical OR (||) and logical NOT (!) are the operators. Consider two relational operations with following output then,
|Logical AND(&&)||Logical OR(||)||Logical NOT(!)|
A bitwise operator is used to perform bitwise operations on bit patterns or binary numerals to perform bit manipulation.
||||Bitwise Inclusive OR|
|^||Bitwise Exclusive OR|
|~||Bitwise NOT(1's complement,unary)|
This operator returns a value depending on a condition. It is a ternary operator, which requires three operands to operate upon.
result=Condition1 ? Condition 2 : Condition 3;
If the value of a is greater than b the value of a will be stored in result otherwise the value of b will stored in b.
It is a unary operator that returns the number of bytes occupied by the variable or data type specified within parentheses
This operator is used to separate group of expressions and evaluate from left to right in sequence.This operator has only limited use cases.
int a=5, b=3;