In X = (M + N x O)/(P x Q), how many one-address instructions are required to…
2015
In X = (M + N x O)/(P x Q), how many one-address instructions are required to evaluate it?
- A.
4
- B.
6
- C.
8
- D.
10
Attempted by 190 students.
Show answer & explanation
Correct answer: C
Expression X = (M + N * O) / (P * Q) requires 8 one-address instructions: LOAD M, ADD N, MUL O, STORE T1, LOAD P, MUL Q, STORE T2, DIV T1, T2.
A video solution is available for this question — log in and enroll to watch it.