void main(){
int a;
a=10;
a*=10+2;
printf("%d",a);
}

it is giving me output as 120,as multiplication has higher priority than addition so i think output should be 102,can sonebody please explain me why i m getting output as 120,thanks

The combined operators, like += and *=, can always be thought of as treating their right hand operator as a grouped expression. That is, "a *= 10 + 2" is equivalent to "a = a * ( 10 + 2 )", and is not equivalent to "a = a * 10 + 2".