+
, -
, *
, /
: these operators have
the usual meaning.
&&
: logical and (conjunction). X && Y
evaluates
to zero (false) if and only if at least one side of the operator
is zero. The expression evaluates to non-zero if and only if
both sides are non-zero.
||
: logical or (disjunction). X || Y
evalutes to
non-zero (true) if and only if at least one side of the operator
is non-zero. The expression evaluates to zero if and only if
both sides are zero.
!
: logical not (negation). !X
evaluates to
non-zero if and only if X
is zero. The expression
evaluates to zero if and only if X
is non-zero.
&
: bitwise-and.
|
: bitwise-or.
^
: bitwise-exclusive-or.
~
: bitwise-not
*
(unary operator): deference
&
(unary operator): address of
?:
: if-then-else. <bexpr>?<texpr>:<fexpr>
evalutes
to <texpr>
if and only if <bexpr>
evaluates to
non-zero. The expression evaluates to <fexpr>
if and only
if <bexpr>
evaluates to zero.
Copyright © 2006-09-25 by Tak Auyeung