Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?
A. 450
B. 10
C. 110
D. -10
E. -110
Answer: Option B
Solution(By Examveda Team)
As the expression is evaluated from right to left.
Join The Discussion
Comments ( 2 )
Related Questions on Operators and Expressions
What does the ++ operator do in C when applied to a variable?
A. Decrements by 1
B. Adds 1
C. Doubles the value
D. Leaves it unchanged
= is the assignment operator and evaluates from right to left
c = c*5 =100
b = b-c =110-100 =10
a =b =10
yes c*5=20*5=100 and the question now becomes a=b-=c=100;
b=b-c=110-100=10 and the question now becomes a=b=10;
the answer to this question starts by evaluating from right to left.