Why does i|= j|= k|= (j+= i) - - (k+++k) - - (i =+j) == 11?
问题 I came across this code in a project I have started working on. The original developer is no longer available, and I can't make any sense of it: k = (j = (i = 0) + 2) + 1; return i|= j|= k|= (j+= i) - - (k+++k) - - (i =+j); It produces a value of 11 . How does this work? What is the =+ operator? What is the +++ operator? What is the - - operator? What is the |= operator? 回答1: What is the =+ operator? That's two operators, one assignment operator, = , and one unary plus, + , which does nothing