Question 3 (10 marks) 1) Given the following code segment in Figure 4, find the value of Z and show the solution steps in Table 1. (5 marks) int a=2, b=4, c=3, d=6, e=5; ++b += a* C+el (d%4); Figure 4 Table 3: Step in evaluating arithmetic expression Arithmetic Operation Step 0 ++b += a*c+e/(d%4) i) Given the following code segment in Figure 5, find the value of Z and show the solution steps in Table 4. (5 marks) int a=3, b=4, c=6; float x=5.0, y=7.0, 2; 2 = (a + y) * X - b + cfa / -b * y; Figure 5 6 Table 4: Step in evaluating arithmetic expression Step Arithmetic Operation 0 Z= (a + y) *x - b + c % a/-b* y
没有找到相关结果