Given code:

int main() { int a = 8; int b = 100; float d; int c = ++a * a++; d = b / (--a); return 0; } 

but for some reason in variable с is equal to 90 , and in it is equal to 81 .

    1 answer 1

    Undefined behavior is classic:

      int c = ++a * a++; 

    For C ++ 98:

    Double entry in variable a within one point of following.

    For C ++ 11:

    Violation of the rules of the order of calculation.

    The program is erroneous. The compiler may react randomly.