Total 7 Operators:

  1. Arithmetic Operators
  2. Relational Operators
  3. Logical Operators
  4. Bitwise Operators
  5. Assignment Operators
  6. Increment and Decrement Operators
  7. Conditional or Ternary Operators


1. Arithmetic Operator
Operators Explaination
+ (Addition) ये दो Operands को add करता है |
-(Subtraction) ये right operand से left operand को निकाल देता है |
*(Multiplication) ये दो Operands को multiply करता है |
/(Division) ये right operand द्वारा left operand को divide करता है |
%(Modulus) ये right operand द्वारा left operand को divide करके remainder निकालता है |


2. Relational Operators
Operators Explaination
<(less than) एक Operand की value दूसरे Operand से कम हो तो ये true return करता है | for eg. num1=5; num2=6; num1 < num2
> (greater than) एक Operand की value दूसरे Operand से ज्यादा हो तो ये true return करता है | for eg. num1=6; num2=5; num1 > num2
<= (less than or equal to) एक Operand की value दूसरे Operand से कम हो या बराबर (equal) हो तो ये true return करता है | for eg. num1=5; num2=5; num1 <= num2
>= (greater than or equal to) एक Operand की value दूसरे Operand से ज्यादा हो या बराबर (equal) हो तो ये true return करता है | for eg. num1=5; num2=5; num1 >= num2
== (equal to) दो Operands जब बराबर(equal) होते है, तब ये true return करता है |
!= (not equal to) दो Operands जब एक-दूसरे से अलग होते है, तब ये true return करता है |


3. Logical Operators
Operators Explaination
&& (logical AND) अगर दोनों conditions true हो तो ये true return करेगा | for eg. (5<6>5)
|| (logical OR) अगर दोनों में से एक भी true है , तो ये true return करेगा | for eg. (5<6>5)
! (logical NOT) अगर condition true हो तो ये उसे false कर देता है | for eg. !((5<6>5)) !((5<6>5))


4. Bitwise Operators

Binary Left Shift( << ) : binary numbers left side से shift करता है |
Right Shift( >> ) : binary numbers right side से shift करता है |
Complement Operator (~) : ये Operator सारे bit reverse करता है,  0 को 1 कर देता है और 1 को 0 कर देता है |


5. Assignment Operators
Operators Examples
= (assignment) c = a + b
+= (add assignment) c += a same as c = c + a
-= (subtract assignment) c -= a same as c = c - a
*= (multiply assignment) c *= a same as c = c * a
/= (divide assignment) c /= a same as c = c / a
%= (modulus assignment) c %= a same as c = c % a
&= (AND assignment) c &= a same as c = c & a
|= (OR assignment) c |= a same as c = c | a
^= (XOR assignment) c ^= a same as c = c ^ a
/<<= (Left Shift assignment) c <<= a same as c = c << a
>>= (Right Shift assignment) c >>= a same as c = c >> a

6. Increment and Decrement Operators

Increment Operator (++): ये variable की value 1 से बढ़ा देता है |
Decrement Operator (--)  : ये variable की value 1 से घटा देता है |


7. Conditional or Ternary Operators

Conditional Operator में तीन Expressions होते है | अगर पहला expression true होता है, तो वो दूसरा expression output में print करता है | अगर Conditional Operator में पहला expression false होता है, तो वो तीसरा expression output में print करता है |

Syntax for Conditional / Ternary Operator
expression1 ? expression 2 : expression 3

Conditional Operator को Ternary Operator भी कहते है |