|
|
coherent
operator Definition operator
An operator relates one operand to another. For example, the
statement
1+2
relates the operands 11 and 22 through the operation of addition;
on the other hand, the statement
A>B
relates the operands AA and BB logically, by asserting that the
former is greater than the latter; whereas
A=B
relates the operands AA and BB by assigning the value of the latter
to the former. The following is a table of the C operators:
* Multiplication
/ Division
% Remainder
+ Addition
- Subtraction
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
&& Logical AND
!= Inequality
! Logical negation
| | logical OR
& Bitwise AND
^ Bitwise exclusive OR
~ Bitwise complement
| Bitwise inclusive OR
<< Bitwise shift left
>> Bitwise shift right
COHERENT Lexicon Page 1
operator Definition operator
= Assign
+= Increment and assign
-= Decrement and assign
*= Multiply and assign
/= Divide and assign
%= Modulus and assign
++ Increment
-- Decrement
== Equivalence
&= Bitwise AND and assign
^= Bitwise exclusive OR and assign
|= Bitwise inclusive OR and assign
<<= Bitwise shift left and assign
>>= Bitwise shift right and assign
* Indirection
& Render an address
() Function indicator
[] Array indicator
-> Structure pointer
. Structure member
? : Conditional expression
ssiizzeeooff size of an object
For a table of the precedence of operators, see the entry for
pprreecceeddeennccee.
***** See Also *****
definitions, precedence, sizeof
COHERENT Lexicon Page 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.