Поделиться через


Expressions with Binary Operators

Binary operators act on two operands in an expression. The binary operators are:

  • Multiplicative operators

    • Multiplication (*)

    • Division (/)

    • Modulus (%)

  • Additive operators

    • Addition (+)

    • Subtraction (–)

  • Shift operators

    • Right shift (>>)

    • Left shift (<<)

  • Relational and equality operators

    • Less than (<)

    • Greater than (>)

    • Less than or equal to (<=)

    • Greater than or equal to (>=)

    • Equal to (==)

    • Not equal to (!=)

  • Bitwise operators

    • Bitwise AND (&)

    • Bitwise exclusive OR (^)

    • Bitwise inclusive OR (|)

  • Logical operators

    • Logical AND (&&)

    • Logical OR (||)

  • Assignment operators

    • Assignment (=)

    • Addition assignment (+=)

    • Subtraction assignment (–=)

    • Multiplication assignment (*=)

    • Division assignment (/=)

    • Modulus assignment (%=)

    • Left shift assignment (<<=)

    • Right shift assignment (>>=)

    • Bitwise AND assignment (&=)

    • Bitwise exclusive OR assignment (^=)

    • Bitwise inclusive OR assignment (|=)

  • Comma Operator (,)

See Also

Reference

Types of Expressions