Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Let variables A and B be integer variables, with expressions A = 2 and B = 5;; The values of b++ and A+B are that I know the answer ... but I don't know how to analyze it.
Let variables A and B be integer variables, with expressions A = 2 and B = 5;; The values of b++ and A+B are that I know the answer ... but I don't know how to analyze it.
First, the value of a+b is 8.

The value after b++ is 6, so a+b=8.

It should be noted that there is no rule of "use before adding" or "add before using" in comma expressions.

That is to say, if ++b and b++ are put in comma expressions respectively (as you wrote above), there is no principle of adding first or adding later in this format.

If it is not a comma expression alone (such as: b+++a,), the problem of adding first and then adding will appear.