Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Let the values of plastic variables A and B be 8, printf ("%d, %d ",(a++, b++), b-); What is the output of? I need a detailed explanation, thank you
Let the values of plastic variables A and B be 8, printf ("%d, %d ",(a++, b++), b-); What is the output of? I need a detailed explanation, thank you
The result is 9, 8;

Because b- is calculated first, and then (a++, b++) is executed, which is equivalent to++b in brackets;

When calculating b-, assign b to brackets to calculate++.

If it becomes printf ("%d, %d ",(a++, ++b), -b), the result is 8,7.

Because you subtract 1 from b first, and then put it in parentheses.