What is the difference between “++” and “+= 1 ” operators?
num += 1 is rather equivalent to ++num. All those expressions (num += 1, num++ and ++num) increment the value of num by one, but the value of num++ is the value num had before it got incremented. Illustration: int a = 0; int b = a++; // now b == 0 and a == … Read more