Final answer:
The value of the expression int a = b * (-c + 2) / 2; given b = 5 and c = 10 evaluates to -20.
Step-by-step explanation:
The result of the assignment statement can be calculated step by step by first evaluating the expression inside the parentheses and then following the order of operations. According to the given values, let's substitute b = 5 and c = 10 into the expression:
int a = b * (-c + 2) / 2;
Now, perform the operation inside the parentheses:
int a = 5 * (-(10) + 2) / 2;
int a = 5 * (-8) / 2;
Next, perform the multiplication:
int a = -40 / 2;
Finally, divide:
int a = -20;