Evaluate the following expressions,if the values of the variable are:
a=2, b=11 and c=4 ii) a * (++b) %c;
Answers
Answered by
0
Remember, the order of operators is {++ or --, / or %, *, +, -}
a=2 , b=11, c=4
a* (++b) %c (a=2, b=11, c=4)
a * 12 % c (a=2, b=12, c=4)
2 * 12%4 (a=2, b=12, c=4)
2 * 0 (a=2, b=12, c=4)
=> 0 (a=2, b=12, c=4)
So, the final value of the expression is zero.
Similar questions