运算过程中,变量会不会被重新赋值?

已知double a=5.2; ,则语句a+=a-=(a=4)*(a=3);运行后a的值为?
在运算过程中,a有没有被重新赋值?
运算a+=时的a是5.2还是4?

当然会被重新赋值,因为是赋值语句
显示(a=4)*(a=3),值为9,因为先执行a=4,再执行 a=3,最后执行a * a = 3 * 3 = 9
然后a-=9,相当于 a=a-9=3-9 = -6
最后 a+=-6,所以a=-12

会的,可以看下这个代码理解一下

#include<bits/stdc++.h>
using namespace std;
int main(){
    double a=5.2;
    double b = (a=4)*(a=3);
    printf("b = %lf a = %lf\n",b,a);
    double c = a -= b;
    printf("%lf a = %lf\n",c,a);
    a+=c;
    printf("%lf",a);
}

不要写这种代码,因为它的行为是未定义的,在不同编译器上运行得到的结果不一样。
https://en.cppreference.com/w/cpp/language/eval_order

Order of evaluation of the operands of any C operator, including the order of evaluation of function arguments in a function-call expression, and the order of evaluation of the subexpressions within any expression is unspecified (except where noted below). The compiler will evaluate them in any order, and may choose another order when the same expression is evaluated again.

(1) If a side effect on a scalar object is unsequenced relative to another side effect on the same scalar object, the behavior is undefined.

i = ++i + i++; // undefined behavior
i = i++ + 1; // undefined behavior
f(++i, ++i); // undefined behavior
f(i = -1, i = -1); // undefined behavior

(2) If a side effect on a scalar object is unsequenced relative to a value computation using the value of the same scalar object, the behavior is undefined.

f(i, i++); // undefined behavior
a[i] = i++; // undefined bevahior