`c--`

is a postfix operator which changes `c`

after it's been used.You need to be very careful when using these, as the results you get may not be what you expected. See here: Why does x = ++x + x++ give me the wrong answer?[^]

Quote:Thank you so much! I've read an article and found the "Precedence and Order of Evaluation" from MSDN.

For the moment the precedence of operators doesn't answer the question "why"

for example

int a = 5;

int b = 3;

int i = 10;

int x = (i++) + a * b;

logically (if we agree with precedence) i should be 11 (!) and x = 26, not 25, because i++ is placed in brackets.

but the ++ operator is still omit eventually, no matter on evaluation direction

No, you are wrong.

C#

Copy Code

`int x = i++ + a * b;`

Is using a post fix increment, which says, "use the current value of `i`

and then add one to `i`

"If you write it long hand, you get this:

C#

Copy Code

int i2 = i; i += 1; x = i2 + a * b;which is:

C#

Copy Code

25 == 10 + 3 * 5;That's

**mixing auto increment and decrement operators in the same expression is so fraught: there are no universal rules to say exactly when the increment should be done.**

*why*Think of this, assuming i is 10

C#

Copy Code

x = i++ + i;What is the value of x?

20?

21?

22?

The "right" answer is 21, and i ends up as 11.

C#

Copy Code

int i2 = i; i += 1; x = i2 + i;But ... it could easily be 20 if strictly evaluated from right to left:

C#

Copy Code

```
x = i + i;
i += 1;
```