Thursday, March 10, 2011

2.10 Assignment Operators and Expressions

  • Assignment Operators: += (ie. i = i + 2 can be written as i += 2)
  • Most binary operators have a corresponding assignment operator op = (op:  + - * / % << >> & ^ | )
  • expr1 op = expr2 equal to expr1 = (expr1) op (expr2) 

No comments:

Post a Comment