What is Operators in C++ - Prolearner00

What is Operators in C++

Operators are tokens that trigger some computation when applied to variables and other objects in an expression. The following list gives a brief description of the operators and their functions.

 What is Unary operators

Unary operators are those operators that require one operator to operate upon. Following are some unary operators:


  &         Address operator
  *          Indirection operator
  +         Unary plus
   -        Unary minus
   ~       F1
  ++     Bitwise complement
 --       increment operator
   !      decrement operator Logical negation


What is Binary operators


Binary operators are those operators that require two operands to operate upon.
Following are some binary operators:
Arithmetic operators
+          Addition
-           Subtraction
*          Multiplication
/           Division
%         Remainder/ Modulus
Shift operators
<<     shift left
>>
    shift right
 

What is Bitwise operators

&       Bitwise AND
^        Bitwise exclusive OR (XOR)
|         Bitwise OR
Logical operators
&&    Logical AND
||        Logical OR


What is Assignment operators


=        Assignment
/=       Assign quotient
+=      Assign sum
<<=    Assign left shift
*=      Assign product
%=     Assign remainder
-=        Assign difference
>>=     Assign right shift
^=        Assign bitwise XOR)
 

What is Relational operators

>        Less than
<        Greater than
<=        Less than or equal to
>=        Greater than or equal to
==        Equal to Not equal to

Component Selection Operators
Direct component selector
Indirect component selector


What is Class member operators

.... Scope access/resolution
Deference pointer to class member
 Deference pointer to class member
 
Conditional operators
?
:

Comments

Popular posts from this blog

Interpretation vs Compilation

Data Representation in Computer - ProLearner