Assignment and Bitwise Operators

 Assignment Operators(=,+=,-=,*=,/=,%=)

The assignment operators are used to assign right-hand side value( Rvalue ) to the left-hand side variable(L value). The Assignment operator used in different variants along with arithmetic operators.


Operator

Meaning

Example

=

Assign the right-hand side value to left-hand side variable

A=15

+=

Add both left and right-hand side values and store the result into left-hand side variable

A+=10

A=A+10

 

-=

Subtract right-hand  side value from left-hand side variable value and store the result

Into left-hand side variable

A-=B

A=A-B

 

*=

Multiply right-hand side value with left-hand side variable

Value and store the result

Into left hand side variable

A*=B

A=A*B

 

 

/=

Divide left-hand side variable value with right-hand side

Variable value and store the result

Into the left-hand side variable

A/=B

A=A/B 

 

 


Comments

Popular posts from this blog

CYBER SECURITY & CRACKING PASSWORDS

"The Dark Side of Social Media: How It Fuels Digital Addiction and Impacts Mental Health"

Online Platforms to Learn Coding