In x = x + 1, is x evaluated twice? If so, does that mean in x += 1, x is only evaluated once? How are the two expressions evaluated in terms of compiler intermediate code?
For example, x++ could mean : take the location of x, load the contents of x into a register, and increment the value of x in memory.
Also I have read that x += 1 is useful when x is not a simple variable, but an expression involving an array. Any ideas why this is the case?
In most compilers these would be identical