In three-address code represented via triples, each entry has three fields: (op, arg1, arg2), and intermediate values are referenced by their triple indices (such as (0), (1), etc.).
Let us break down the evaluation of the expression x[i]=(p+r)∗−s[i]+u/w step-by-step:
Triple (0): Evaluates p+r
(0)+pr Triple (1): Array access / dereference for s[i] (reading an array element into a temporary value uses the operator =[]):
(1)=[]si Triple (2): Computes unary minus of s[i]:
(2)uminus(1) Triple (3): Multiplies (p+r) with −s[i], which corresponds to multiplying the result of triple (0) with triple (2):
(3)∗(0)(2) Triple (4): Computes u/w:
(4)/uw Triple (5): Adds the two terms (p+r)∗−s[i] and u/w:
(5)+(3)(4) Triple (6): Specifies the array target location x[i] for assignment (using the indexed assignment operator []=):
(6)[]=xi Triple (7): Assigns the final expression value in (5) to the array location specified by (6):
(7)=(6)(5)
Thus, the missing entries are:
This matches Option (A).