Documente Academic
Documente Profesional
Documente Cultură
Unary Plus(+)
UNARY
The operator unary plus (+) is written before the operand.
-Operates on only one operand,
e.g., -x, ++x, --x (the element is x). This operator results in the same value of the variable.
Binary
-Operators are symbols that perform logical or mathematical The operator unary minus (-) also precedes an operand.
functions on operands such as variables, constants, and objects.
This operator inverts the value of an operand,
OPERANDS
i.e. if an operand value, it converts the value of that
-Operands are data values involved in the operation.
operand to its negative value and vice-versa
. Arithmetic Operators
++a
It increases the value of operand by 1, LOGICAL OPERATIONS
Relational Operators
and then evaluates the expression. -A logical operation is a special
-Relational operators are used to show
symbol or word which connects two
the relationship among the operands. Example 2
or more phrases of information.
-These operators compare -It is most often used to test
the values of variables and determine whether a certain relationship
the result in the boolean expression, between the phrases is true or
Example 3
Suffix Increment(x++)
When an increment operator follows its operand, it
is known as SUFFIX increment.
a++
It evaluates the expression, and then increases the
value of operand by 1.