Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
15 views

Assignment Operators

Assignment operators perform arithmetic or bitwise operations on the first and second operands and store the result in the object specified by the first operand. Some common assignment operators include = for simple assignment, += and -= for addition and subtraction assignment, and &=, ^=, and |= for bitwise AND, exclusive OR, and inclusive OR assignment respectively.

Uploaded by

naveen reddy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Assignment Operators

Assignment operators perform arithmetic or bitwise operations on the first and second operands and store the result in the object specified by the first operand. Some common assignment operators include = for simple assignment, += and -= for addition and subtraction assignment, and &=, ^=, and |= for bitwise AND, exclusive OR, and inclusive OR assignment respectively.

Uploaded by

naveen reddy
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment Operators

Opera tor = *= /= %= += = <<= >>= &= ^= |= Meaning Store the value of the second operand in the object specified by the first operand (simple assignment). Multiply the value of the first operand by the value of the second operand; store the result in the object specified by the first operand. Divide the value of the first operand by the value of the second operand; store the result in the object specified by the first operand. Take modulus of the first operand specified by the value of the second operand; store the result in the object specified by the first operand. Add the value of the second operand to the value of the first operand; store the result in the object specified by the first operand. Subtract the value of the second operand from the value of the first operand; store the result in the object specified by the first operand. Shift the value of the first operand left the number of bits specified by the value of the second operand; store the result in the object specified by the first operand. Shift the value of the first operand right the number of bits specified by the value of the second operand; store the result in the object specified by the first operand. Obtain the bitwise AND of the first and second operands; store the result in the object specified by the first operand. Obtain the bitwise exclusive OR of the first and second operands; store the result in the object specified by the first operand. Obtain the bitwise inclusive OR of the first and second operands; store the result in the object specified by the first operand.

You might also like