Atamalar

1.5.5 Assignment An assignment operator stores the value of the right expression into the left expression. expression1 = expression2 The value of expression2 is stored in expression1. expression1 *= expression2 The value of expression1 times expression2 is stored in expression1. expression1 /= expression2 The value of expression1 divided by expression2 is stored in expression1. expression1 %= expression2 The value of the remainder of expression1 divided by expression2 is stored in expression1. expression1 += expression2 The value of expression1 plus expression2 is stored in expression1. expression1 -= expression2 The value of expression1 minus expression2 is […]

Daha Fazla

Doğru veya Yanlış

1.5.4 Boolean The boolean operators return either 1 (true) or 0 (false). expression1 && expression2 Returns the logical AND operation of expression1 and expression2. The result is 1 (true) if both expressions are true, otherwise the result is 0 (false). e1 e2 Result 0 0 0 0 1 0 1 0 0 1 1 1 expression1 || expression2 Returns the logical OR […]

Daha Fazla

Normal

1.5.3 Normal There are several normal operators which return the result defined for each: expression1 + expression The result of this is the sum of the two expressions. expression1 – expression2 The result of this is the value of expression2 subtracted from expression1. expression1 * expression2 The result of this is the value of expression1 multiplied by expression2. expression1 / expression2 The result of this is the value of expression1 divided […]

Daha Fazla

Son Ek

1.5.1 Postfix Postfix operators are operators that are suffixed to an expression. operand++; This causes the value of the operand to be returned. After the result is obtained, the value of the operand is incremented by 1. operand–; This is the same but the value of the operand is decremented by 1. Examples: int joe=3; joe++; The […]

Daha Fazla

Tekli ve Ön Ek

1.5.2 Unary and Prefix Prefix operators are operators that are prefixed to an expression. ++operand; This causes the value of the operand to be incremented by 1. Its new value is then returned. –operand; This is the same but the value of the operand is decremented by 1. !operand Returns the logical NOT operation on […]

Daha Fazla

Öncelik

1.5.6 Precedence The operators have a set order of precedence during evaluation. Items encapsulated in parenthesis are evaluated first and have the highest precedence. The following chart shows the order of precedence with the items at the top having highest precedence.   Operator Name ! Logical NOT. Bang. ++ — Increment and decrement operators. * […]

Daha Fazla