Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - There are integer variables a, b and c, and their initial values are 1. Run expression:++A
There are integer variables a, b and c, and their initial values are 1. Run expression:++A
(1) expression: ++a

& amp& amp

++b

& amp& amp

++c

Is a logical expression. When all operands of the expression are not zero, the value of the expression is 1, otherwise it is 0;

(2) When calculating the above formulas and logical expressions, all objects should be operated, and you are performing++operation, and a++ is equivalent to a=a+ 1, so 1 is added to each variable, so the final values of A, B and C are all 2.