Assignment Operators Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

=

A

Simple assignment operator, Assigns values from right side operands to left side operand ex. c = a + b will assigne value of a + b into c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

+=

A

Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand ex. c += a is equivalent to c = c + a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

-=

A

Subtract AND assignment operator, It subtracts right operand from the left operand and assign the result to left operand ex. c -= a is equivalent to c = c - a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

*=

A

Multiply AND assignment operator, It multiplies right operand with the left operand and assign the result to left operand ex. c *= a is equivalent to c = c * a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

/=

A

Divide AND assignment operator, It divides left operand with the right operand and assign the result to left operand ex. c /= a is equivalent to c = c / a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

%=

A

Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand ex. c %= a is equivalent to c = c % a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

**=

A

Exponent AND assignment operator, Performs exponential (power) calculation on operators and assign value to the left operand ex. c **= a is equivalent to c = c ** a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly